WPILibC++ 2024.3.2
timestamp.h File Reference
#include <stdint.h>
#include <memory>

Go to the source code of this file.

Namespaces

namespace  wpi
 
namespace  wpi::impl
 

Functions

void WPI_Impl_ShutdownNowRio (void)
 De-initialize the on-Rio Now() implementation. More...
 
uint64_t WPI_NowDefault (void)
 The default implementation used for Now(). More...
 
void WPI_SetNowImpl (uint64_t(*func)(void))
 Set the implementation used by WPI_Now(). More...
 
uint64_t WPI_Now (void)
 Return a value representing the current time in microseconds. More...
 
uint64_t WPI_GetSystemTime (void)
 Return the current system time in microseconds since the Unix epoch (January 1st, 1970 00:00 UTC). More...
 
void wpi::impl::SetupNowDefaultOnRio ()
 Initialize the on-Rio Now() implementation to use the desktop timestamp. More...
 
template<typename T >
bool wpi::impl::SetupNowRio (void *, std::unique_ptr< T >)
 Initialize the on-Rio Now() implementation to use the FPGA timestamp. More...
 
bool wpi::impl::SetupNowRio (uint32_t session)
 Initialize the on-Rio Now() implementation to use the FPGA timestamp. More...
 
void wpi::impl::ShutdownNowRio ()
 De-initialize the on-Rio Now() implementation. More...
 
uint64_t wpi::NowDefault ()
 The default implementation used for Now(). More...
 
void wpi::SetNowImpl (uint64_t(*func)())
 Set the implementation used by Now(). More...
 
uint64_t wpi::Now ()
 Return a value representing the current time in microseconds. More...
 
uint64_t wpi::GetSystemTime ()
 Return the current system time in microseconds since the Unix epoch (January 1st, 1970 00:00 UTC). More...
 

Function Documentation

◆ WPI_GetSystemTime()

uint64_t WPI_GetSystemTime ( void  )

Return the current system time in microseconds since the Unix epoch (January 1st, 1970 00:00 UTC).

Returns
Time in microseconds.

◆ WPI_Impl_ShutdownNowRio()

void WPI_Impl_ShutdownNowRio ( void  )

De-initialize the on-Rio Now() implementation.

No effect on non-Rio platforms.

◆ WPI_Now()

uint64_t WPI_Now ( void  )

Return a value representing the current time in microseconds.

The epoch is not defined.

Returns
Time in microseconds.

◆ WPI_NowDefault()

uint64_t WPI_NowDefault ( void  )

The default implementation used for Now().

In general this is the time returned by the operating system.

Returns
Time in microseconds.

◆ WPI_SetNowImpl()

void WPI_SetNowImpl ( uint64_t(*)(void)  func)

Set the implementation used by WPI_Now().

The implementation must return monotonic time in microseconds to maintain the contract of WPI_Now().

Parameters
funcFunction called by WPI_Now() to return the time.