Table of Contents

Class Utils

Namespace
CTRE.Phoenix6
Assembly
Phoenix6.Hardware.dll

Static class holding the methods for interfacing to the Phoenix Utils API

public static class Utils
Inheritance
Utils
Inherited Members

Methods

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.
public static double GetCurrentTimeSeconds()

Returns

double

Current time in seconds

GetSystemTimeSeconds()

Get the system 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.
public static double GetSystemTimeSeconds()

Returns

double

System time in seconds

IsReplay()

Get whether the program is running in replay mode.

public static bool IsReplay()

Returns

bool

true if in replay mode

IsSimulation()

Get whether the program is running in simulation.

public static bool IsSimulation()

Returns

bool

true if in simulation