diff options
author | Benjamin Schubert <contact@benschubert.me> | 2020-07-04 16:52:33 +0000 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2020-07-06 18:07:53 +0000 |
commit | 472e3d165df3f9866c0665d4f3ffa19f864d33a4 (patch) | |
tree | db03e12fc6f617545c5e0e9fc1fa0bc473227ad6 /src/buildstream/_stream.py | |
parent | 3cb61cfee0fb7c66be1af9d19b3316f966ce3090 (diff) | |
download | buildstream-472e3d165df3f9866c0665d4f3ffa19f864d33a4.tar.gz |
_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
Diffstat (limited to 'src/buildstream/_stream.py')
-rw-r--r-- | src/buildstream/_stream.py | 11 |
1 files changed, 0 insertions, 11 deletions
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: |