Skip to content

Commit

Permalink
Updated to use monotonic from time
Browse files Browse the repository at this point in the history
  • Loading branch information
imbeacon committed Mar 20, 2024
1 parent 817a69a commit f8fd507
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tb_gateway_mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
#

import logging
import time
try:
from time import monotonic as time
except ImportError:
from time import time
from tb_device_mqtt import TBDeviceMqttClient

GATEWAY_ATTRIBUTES_TOPIC = "v1/gateway/attributes"
Expand Down Expand Up @@ -122,7 +125,7 @@ def __request_attributes(self, device, keys, callback, type_is_client=False):
log.error("There are no keys to request")
return False

ts_in_millis = int(round(time.time() * 1000))
ts_in_millis = int(round(time() * 1000))
attr_request_number = self._add_attr_request_callback(callback)
msg = {"keys": keys,
"device": device,
Expand Down

0 comments on commit f8fd507

Please sign in to comment.