WPILibC++ 2023.4.3-108-ge5452e3
timestamp.h File Reference
#include <stdint.h>

Go to the source code of this file.

Namespaces

namespace  wpi
 

Functions

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...
 
uint64_t wpi::NowDefault (void)
 The default implementation used for Now(). More...
 
void wpi::SetNowImpl (uint64_t(*func)())
 Set the implementation used by Now(). More...
 
uint64_t wpi::Now (void)
 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_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.