RobWorkProject  24.5.15-
Static Public Member Functions | List of all members
TimerUtil Class Reference

Access of the system clock so called wall time. More...

#include <TimerUtil.hpp>

Static Public Member Functions

static long long currentTimeMs ()
 Returns system clock in milli-seconds. More...
 
static long long currentTimeUs ()
 Returns system clock in micro-seconds. More...
 
static double currentTime ()
 Returns system clock in seconds. More...
 
static void sleepMs (int period)
 Sleeps for a period of time. More...
 
static void sleepUs (int period)
 Sleeps for a period of time. More...
 

Detailed Description

Access of the system clock so called wall time.

Member Function Documentation

◆ currentTime()

static double currentTime ( )
static

Returns system clock in seconds.

Warning
The date/time at which this timer counts from is platform-specific, so you should not use it for getting the calendar time. It's really only meant for calculating wall time differences.

◆ currentTimeMs()

static long long currentTimeMs ( )
static

Returns system clock in milli-seconds.

Warning
The date/time at which this timer counts from is platform-specific, so you should not use it for getting the calendar time. It's really only meant for calculating wall time differences.

◆ currentTimeUs()

static long long currentTimeUs ( )
static

Returns system clock in micro-seconds.

Warning
The date/time at which this timer counts from is platform-specific, so you should not use it for getting the calendar time. It's really only meant for calculating wall time differences.

Notice: The timer cannot hold times longer than approx. 2100second.

◆ sleepMs()

static void sleepMs ( int  period)
static

Sleeps for a period of time.

Parameters
period[in] the time in miliseconds to sleep

◆ sleepUs()

static void sleepUs ( int  period)
static

Sleeps for a period of time.

Parameters
period[in] the time in microseconds to sleep

The documentation for this class was generated from the following file: