Generic Lightweight Thread (GLT) Library  2.5
A common API for Lightweight Thread solutions
 All Functions Variables Groups Pages
Functions
Timer functions

Functions

double glt_get_wtime ()
 Returns the current time. More...
 
void glt_timer_create (GLT_timer *timer)
 Creates a timer. More...
 
void glt_timer_free (GLT_timer *timer)
 Destroys a timer. More...
 
void glt_timer_start (GLT_timer timer)
 Inits a timer. More...
 
void glt_timer_stop (GLT_timer timer)
 Stops a timer. More...
 
void glt_timer_get_secs (GLT_timer timer, double *secs)
 Obtains the elapsed time. More...
 

Detailed Description

These functions simplify the use of timers.

Function Documentation

double glt_get_wtime ( )

Returns the current time.

glt_get_wtime() returns the time.

Returns
The time in seconds.
void glt_timer_create ( GLT_timer timer)

Creates a timer.

glt_timer_create() creates a timer.

Parameters
[in,out]timerHande to newly created GLT_timer.
void glt_timer_free ( GLT_timer timer)

Destroys a timer.

glt_timer_free() destroys a timer.

Parameters
[in]timerHandle to the target GLT_timer.
void glt_timer_get_secs ( GLT_timer  timer,
double *  secs 
)

Obtains the elapsed time.

glt_timer_get_secs() given a timer. It calculates the elapsed time in seconds.

Parameters
[in]timerHandle to the target GLT_timer.
[out]secsSeconds.
void glt_timer_start ( GLT_timer  timer)

Inits a timer.

glt_timer_start() inits a timer.

Parameters
[in]timerHandle to the target GLT_timer.
void glt_timer_stop ( GLT_timer  timer)

Stops a timer.

glt_timer_stop() stops a timer.

Parameters
[in]timerHandle to the target GLT_timer.