CTRE Phoenix 6 C++ 26.70.0-alpha-2
Loading...
Searching...
No Matches
ctre::phoenix6::utils Namespace Reference

Functions

CTREXPORT double GetCurrentTimeSeconds ()
 Get the current timestamp in seconds.
CTREXPORT double GetMonotonicTimeSeconds ()
 Get the system monotonic timestamp in seconds.
CTREXPORT bool IsSimulation ()
 Get whether the program is running in simulation.
CTREXPORT bool IsReplay ()
 Get whether the program is running in replay mode.
wpi::units::second_t GetCurrentTime ()
 Get the current timestamp.
wpi::units::second_t GetMonotonicTime ()
 Get the system monotonic timestamp.

Function Documentation

◆ GetCurrentTime()

wpi::units::second_t ctre::phoenix6::utils::GetCurrentTime ( )
inline

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()

CTREXPORT double ctre::phoenix6::utils::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()

wpi::units::second_t ctre::phoenix6::utils::GetMonotonicTime ( )
inline

Get the system monotonic timestamp.

This is NOT the time source used for status signals. Use GetCurrentTime 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()

CTREXPORT double ctre::phoenix6::utils::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.

◆ IsReplay()

CTREXPORT bool ctre::phoenix6::utils::IsReplay ( )

Get whether the program is running in replay mode.

Returns
true if in replay mode

◆ IsSimulation()

CTREXPORT bool ctre::phoenix6::utils::IsSimulation ( )

Get whether the program is running in simulation.

Returns
true if in simulation