TLIB documentation
 

tlTimer.h File Reference


Detailed Description

High resolution timers for TLIB.

LINUX: uses gettimeofday(), which provides resolution in microseconds. The actual resolution is not nearly as precise, but is less than 1 msec.

WIN32: uses GetTickCount (approx. 10 msec resolution) or the high performance clock (less than 1 msec resolution)

The real resolution is machine dependant.

#include "tlVision.h"

Include dependency graph for tlTimer.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define TL_MAX_TIMER   10

Functions

int tl_timer_init (void)
unsigned long tl_timer_get_time (void)
int tl_timer_reset (int index)
unsigned long tl_timer_get (int index)


Define Documentation

#define TL_MAX_TIMER   10

Maximum number of timers allowed.


Function Documentation

unsigned long tl_timer_get ( int  index  ) 

Poll one of the TL timers.

Parameters:
index timer index
Returns:
Timer value [ms] 0 on success, 0 otherwise.
See error management for details.

unsigned long tl_timer_get_time ( void   ) 

Poll TL main timer.

Returns:
Timer value [ms] on success, 0 otherwise.
See error management for details.

int tl_timer_init ( void   ) 

Initilize TL main timer.

Returns:
0 on success, -1 otherwise.
See error management for details.

int tl_timer_reset ( int  index  ) 

Reset one of the TL timers.

Parameters:
index timer index
Returns:
0 on success, -1 otherwise.
See error management for details.



TLIB documentation - generated on 7 May 2008
Please address any questions to seb@tuyphon.com
(C) 2001-2008 - S. Grange
(C) 2001-2007 - VRAI Group, EPFL
All Rights Reserved.