From 472e3d165df3f9866c0665d4f3ffa19f864d33a4 Mon Sep 17 00:00:00 2001 From: Benjamin Schubert Date: Sat, 4 Jul 2020 16:52:33 +0000 Subject: _state.py: Only use a single place of truth for the start time This moves all implementations of 'start_time' into a single place for easier handling and removing roundtrips of notifications --- src/buildstream/_stream.py | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src/buildstream/_stream.py') diff --git a/src/buildstream/_stream.py b/src/buildstream/_stream.py index 277ea7394..fb0b2f6e1 100644 --- a/src/buildstream/_stream.py +++ b/src/buildstream/_stream.py @@ -90,7 +90,6 @@ class Stream: self._pipeline = None self._state = State(session_start) # Owned by Stream, used by Core to set state self._notification_queue = deque() - self._starttime = session_start # Synchronised with Scheduler's relative start time context.messenger.set_state(self._state) @@ -1081,14 +1080,6 @@ class Stream: def terminated(self): return self._scheduler_terminated - # elapsed_time - # - # Elapsed time since the session start - # - @property - def elapsed_time(self): - return self._state.elapsed_time(start_time=self._starttime) - # terminate() # # Terminate jobs @@ -1661,8 +1652,6 @@ class Stream: self._interrupt_callback() elif notification.notification_type == NotificationType.TICK: self._ticker_callback() - elif notification.notification_type == NotificationType.SCHED_START_TIME: - self._starttime = notification.time elif notification.notification_type == NotificationType.RUNNING: self._scheduler_running = not self._scheduler_running elif notification.notification_type == NotificationType.TERMINATED: -- cgit v1.2.1