Time Classes¶
Note
These classes handle time
Alarm Handle¶
- class CommonAlarmHandle(owner, on_alarm_triggered_callback, timeline, when, should_repeat=False, time_until_repeat=None, accurate_repeat=True, persist_across_zone_loads=False)¶
Bases:
AlarmHandleA custom alarm handle that keeps track of when it is slated to trigger for the first time.
- property is_active¶
True, if the Alarm Handle is currently active and scheduled. False, if not.
Stop Watch¶
- class CommonStopWatch¶
Bases:
objectA class used to see how long things take.
- interval()¶
Retrieve a time stamp for how long the watch has been running for without ending it.
- Returns:
The number of seconds that occurred since the stop watch was started.
- Return type:
float
- interval_milliseconds()¶
Retrieve a time stamp for how long the watch has been running for without ending it, but in milliseconds.
- Returns:
The number of milliseconds that occurred since the stop watch was started.
- Return type:
float
- start()¶
Start the stop watch.
- Return type:
None
- stop()¶
Stop the stop watch.
Warning
This will also reset the start time of the stop watch. It will also stop the stop watch.
- Returns:
The number of seconds that occurred since starting the stop watch.
- Return type:
float
- stop_milliseconds()¶
Stop the stop watch, but return milliseconds rather than seconds.
Warning
This will also reset the start time of the stop watch. It will also stop the stop watch.
- Returns:
The number of milliseconds that occurred since starting the stop watch.
- Return type:
float