log the actual start and end time

This commit is contained in:
HappyZ 2018-02-03 15:08:50 -06:00
parent 71e01db3ca
commit ad16d16273
1 changed files with 8 additions and 0 deletions

View File

@ -43,6 +43,10 @@ class Measurement(object):
'MAC,caliDist(cm),rawRTT(psec),rawRTTVar,rawDist(cm),' +
'rawDistVar,rssi(dBm),time(sec)\n'
)
self.outf.write(
"ff:ff:ff:ff:ff:ff,nan,nan,nan,nan,nan,nan,{0:.6f}\n"
.format(time.time())
)
except Exception as e:
print(str(e))
self.regex = (
@ -165,6 +169,10 @@ class Measurement(object):
def __exit__(self, exc_type, exc_value, traceback):
# properly close the file when destroying the object
if self.outf is not None:
self.outf.write(
"ff:ff:ff:ff:ff:ff,nan,nan,nan,nan,nan,nan,{0:.6f}\n"
.format(time.time())
)
self.outf.close()