From ad16d16273943e1f00ad5e9eb473f985abd54637 Mon Sep 17 00:00:00 2001 From: HappyZ Date: Sat, 3 Feb 2018 15:08:50 -0600 Subject: [PATCH] log the actual start and end time --- libMeasurement.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libMeasurement.py b/libMeasurement.py index d04a970..67e7bd5 100755 --- a/libMeasurement.py +++ b/libMeasurement.py @@ -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()