utils.py 294 B

1234567891011121314
  1. from atomos.multiprocessing.atomic import AtomicFloat
  2. class MockedTime():
  3. def __init__(self):
  4. self._time = AtomicFloat(value=0)
  5. def current_time_in_millis(self):
  6. return self._time.get()
  7. def increment(self, millis):
  8. return self._time.add_and_get(millis)