Timers
- pyrbs.timers.timer.get_monotonic_raw_time()
Get current time using CLOCK_MONOTONIC_RAW.
Returns time in seconds as a float. This clock is not affected by discontinuous jumps in the system time and is not subject to NTP adjustments.
- Returns:
Current time in seconds
- Return type:
float
- pyrbs.timers.timer.get_monotonic_raw_time_ns()
Get current time using CLOCK_MONOTONIC_RAW in nanoseconds.
Returns time in nanoseconds as an integer. This clock is not affected by discontinuous jumps in the system time and is not subject to NTP adjustments.
- Returns:
Current time in nanoseconds
- Return type:
int
- class pyrbs.timers.timer.Timer(_rbs, name, time_to_elapse, execution_count=0, active_on_start=False)
Bases:
Callback- Parameters:
_rbs (object)
name (str)
time_to_elapse (float)
execution_count (int)
active_on_start (bool)
- name: str
- execution_count: int
- active_on_start: bool
- property time_to_elapse: float
- property elapsed: float
- property active: bool
- property count: int
- property callback_order: list[str]
- start()
- Return type:
None
- stop()
- Return type:
None
- reset()
- Return type:
None