iFun Engine API  1.0.0-b6053
Great Technology for Great Games
Public Types | Static Public Member Functions | List of all members
fun::MonotonicClock Class Reference

Funapi uses MonotonicClock to be overcome clock drift. More...

#include <monotonic_clock.h>

Public Types

typedef int64_t Duration
 duration value in usec.
 
typedef int64_t Value
 clock value in usec.
 

Static Public Member Functions

static Duration FromMsec (int64_t msec)
 Converts msec value into Duration.
 
static Duration FromSec (int64_t sec)
 Converts sec value into Duration.
 
static Duration FromUsec (int64_t usec)
 Converts usec value into Duration.
 
static Value Now ()
 Returns the current Monotonic value. More...
 
static void ToTimespec (const Value &value, struct timespec *ret)
 Converts the given Monotonic clock value into timespec.
 

Detailed Description

MonotonicClock provides microsecond granularity.

Member Function Documentation

◆ Now()

static Value fun::MonotonicClock::Now ( )
inlinestatic
Returns
Monotonic::Value