diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/daq/flumotion-plug/s5.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/daq/flumotion-plug/s5.py b/src/daq/flumotion-plug/s5.py index 0f6abd5..bd26698 100644 --- a/src/daq/flumotion-plug/s5.py +++ b/src/daq/flumotion-plug/s5.py @@ -151,6 +151,7 @@ class ComponentSFivePlug(base.ComponentPlug): self._old_bytes_sent = -1 self._sendInit() if self._sfivepoller: + self._start_time = datetime.datetime.utcnow() self._sfivepoller.start() def _sendInit(self): @@ -169,7 +170,7 @@ class ComponentSFivePlug(base.ComponentPlug): bytes_sent_diff = bytes_sent - self._old_bytes_sent if self._old_bytes_sent > 0 else 0; self._old_bytes_sent = bytes_sent - data = { "start-time": datetime.datetime.utcnow().isoformat('T'), + data = { "start-time": self._start_time.isoformat('T'), "duration-ms": self._duration * 1000, "data": { "client-count": client_count, @@ -178,3 +179,4 @@ class ComponentSFivePlug(base.ComponentPlug): } } self._proto.sendDatagram('%s\n' % (json.dumps(data))); + self._start_time = datetime.datetime.utcnow() |