Class Utils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TimeGet the current timestamp.static doubleGet the current timestamp in seconds.static TimeGet the system monotonic timestamp.static doubleGet the system monotonic timestamp in seconds.static booleanisReplay()Get whether the program is running in replay mode.static booleanGet whether the program is running in simulation.
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
getCurrentTime
Get the current timestamp.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
-
getCurrentTimeSeconds
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
-
getMonotonicTime
Get the system monotonic timestamp.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
-
getMonotonicTimeSeconds
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
-
isSimulation
Get whether the program is running in simulation.- Returns:
trueif in simulation
-
isReplay
Get whether the program is running in replay mode.- Returns:
trueif in replay mode
-