pysted.base.Clock
- class pysted.base.Clock(time_quantum_us)
Clock class to keep track of time in experiments involving time
- Parameters:
time_quantum_us – The minimal time increment on which the experiment loop will happen. All other time increments in the experiment should be a multiple of this value (in micro seconds (us)) (int)
Note
The
time_quantum_us
is anint
and so is thecurrent_time
attribute. This means the longest time an experiment can last is determined by the size of the biggestint64
, which means it is 9223372036854775807 us, or 9223372036854.775807 s, which I think should be ample time :)Resets the current_time to 0
Updates the current_time by 1 time_quantum_us