Skip to content

Commit

Permalink
Allow sub-second timestamp resolution
Browse files Browse the repository at this point in the history
In my application of using btmon.py with a Brultech ECM-1240 connected over USB serial to a Netgear R6300v2 running FreshTomato, I was having severe problems with captured data samples being queued out of order. This would consequently cause Grafana graphs of the data to be very spiky and full of dropouts.

Allowing btmon.py to keep the fractional seconds has eliminated this problem.
  • Loading branch information
42Network committed Feb 28, 2019
1 parent 958887c commit 74f075d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/btmon.py
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,7 @@ def mkts(seconds):
return time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime(seconds))

def getgmtime():
return int(time.time())
return time.time()

def cleanvalue(s):
"""ensure that values read from configuration file are sane"""
Expand Down

0 comments on commit 74f075d

Please sign in to comment.