phoenix6.utils¶
Module Contents¶
Functions¶
|
Get the current timestamp in seconds. |
|
Get the system monotonic timestamp in seconds. |
|
Get whether the program is running in simulation. |
|
Get whether the program is running in replay mode. |
- phoenix6.utils.get_current_time_seconds() phoenix6.units.second¶
Get the current timestamp in seconds.
This is the time source used for status signals.
This time source is typically continuous and monotonic. However, it may be overridden in simulation to use a non-monotonic, non-continuous source.
- Returns:
Current time in seconds
- Return type:
second
- phoenix6.utils.get_monotonic_time_seconds() phoenix6.units.second¶
Get the system monotonic timestamp in seconds.
This is NOT the time source used for status signals. Use GetCurrentTImeSeconds instead when working with status signal timing.
This time source is guaranteed to be continuous and monotonic, making it useful for measuring time deltas in a robot program.
- Returns:
System monotonic time in seconds
- Return type:
second
- phoenix6.utils.is_simulation() bool¶
Get whether the program is running in simulation.
- Returns:
True if in simulation
- Return type:
bool
- phoenix6.utils.is_replay() bool¶
Get whether the program is running in replay mode.
- Returns:
True if in replay mode
- Return type:
bool