FS2_Open
Open source remastering of the Freespace 2 engine
timer.cpp File Reference
#include <SDL_timer.h>
#include <sys/time.h>
#include <limits.h>
#include "globalincs/pstypes.h"
#include "io/timer.h"
#include "graphics/2d.h"
#include "globalincs/alphacolors.h"
#include "osapi/osapi.h"

Go to the source code of this file.

Macros

#define THREADED
 
#define MICROSECONDS_PER_SECOND   1000000
 
#define MAX_TIME   (INT_MAX/2)
 

Functions

void timer_close ()
 
void timer_init ()
 
fix timer_get_fixed_seconds ()
 
fix timer_get_fixed_secondsX ()
 
fix timer_get_approx_seconds ()
 
int timer_get_seconds ()
 
int timer_get_milliseconds ()
 
int timer_get_microseconds ()
 
uint timer_get_high_res_microseconds ()
 
void timestamp_reset ()
 
void timestamp_inc (int frametime_ms)
 
int timestamp (int delta_ms)
 
int timestamp_until (int stamp)
 
int timestamp ()
 
int timestamp_has_time_elapsed (int stamp, int time)
 

Variables

int timestamp_ticker = 2
 

Macro Definition Documentation

#define MAX_TIME   (INT_MAX/2)

Definition at line 210 of file timer.cpp.

#define MICROSECONDS_PER_SECOND   1000000

Definition at line 42 of file timer.cpp.

#define THREADED

Definition at line 26 of file timer.cpp.

Function Documentation

void timer_close ( )

Definition at line 44 of file timer.cpp.

fix timer_get_approx_seconds ( )

Definition at line 135 of file timer.cpp.

fix timer_get_fixed_seconds ( )

Definition at line 116 of file timer.cpp.

fix timer_get_fixed_secondsX ( )

Definition at line 130 of file timer.cpp.

uint timer_get_high_res_microseconds ( )

Definition at line 170 of file timer.cpp.

int timer_get_microseconds ( )

Definition at line 160 of file timer.cpp.

int timer_get_milliseconds ( )

Definition at line 150 of file timer.cpp.

int timer_get_seconds ( )

Definition at line 140 of file timer.cpp.

void timer_init ( )

Definition at line 55 of file timer.cpp.

int timestamp ( int  delta_ms)

Definition at line 226 of file timer.cpp.

int timestamp ( )

Definition at line 267 of file timer.cpp.

int timestamp_has_time_elapsed ( int  stamp,
int  time 
)

Definition at line 272 of file timer.cpp.

void timestamp_inc ( int  frametime_ms)

Definition at line 212 of file timer.cpp.

void timestamp_reset ( )

Definition at line 201 of file timer.cpp.

int timestamp_until ( int  stamp)

Definition at line 242 of file timer.cpp.

Variable Documentation

int timestamp_ticker = 2

Definition at line 199 of file timer.cpp.