Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
timer.cpp File Reference
#include "precompiled.h"
#include "timer.h"
#include "lib/module_init.h"
#include "lib/posix/posix_types.h"
#include "lib/status.h"
#include "lib/sysdep/os.h"
#include "lib/utf8.h"
#include <algorithm>
#include <ctime>
#include <mutex>
#include <sstream>
Include dependency graph for timer.cpp:

Macros

#define HAVE_GETTIMEOFDAY   0
 
#define HAVE_CLOCK_GETTIME   0
 

Functions

static Status InitResolution ()
 
void timer_Init ()
 timer_Time will subsequently return values relative to the current time. More...
 
static void EnsureMonotonic (double &newTime)
 
double timer_Time ()
 
double timer_Resolution ()
 

Variables

static double resolution
 
static std::mutex ensure_monotonic_mutex
 

Macro Definition Documentation

◆ HAVE_CLOCK_GETTIME

#define HAVE_CLOCK_GETTIME   0

◆ HAVE_GETTIMEOFDAY

#define HAVE_GETTIMEOFDAY   0

Function Documentation

◆ EnsureMonotonic()

static void EnsureMonotonic ( double &  newTime)
static

◆ InitResolution()

static Status InitResolution ( )
static

◆ timer_Init()

void timer_Init ( )

timer_Time will subsequently return values relative to the current time.

◆ timer_Resolution()

double timer_Resolution ( )
Returns
resolution [s] of the timer.

◆ timer_Time()

double timer_Time ( )
Returns
high resolution (> 1 us) timestamp [s].

Variable Documentation

◆ ensure_monotonic_mutex

std::mutex ensure_monotonic_mutex
static

◆ resolution

double resolution
static