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"
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 TL_MAX_TIMER 10 |
Maximum number of timers allowed.
Referenced by tl_timer_get(), and tl_timer_reset().
unsigned long tl_timer_get | ( | int | index | ) |
Poll one of the TL timers.
index | timer index |
References TL_ERROR, TL_MAX_TIMER, and tl_timer_get().
Referenced by tl_timer_get().
unsigned long tl_timer_get_time | ( | void | ) |
Poll TL main timer.
References TL_ERRNO_MSG, TL_ERROR_TIMER, and tl_timer_get_time().
Referenced by tlObject::getPredictedPosition(), tlObject::getPredictedX(), tlObject::getPredictedY(), tlSourceFiles::grab(), tlSourceFiles::open(), tl_find_best_object(), tl_find_object(), and tl_timer_get_time().
int tl_timer_init | ( | void | ) |
Initilize TL main timer.
References TL_ERRNO_MSG, TL_ERROR, TL_NO_ERROR, tl_timer_init(), and tlVerbose.
Referenced by tl_timer_init().
int tl_timer_reset | ( | int | index | ) |
Reset one of the TL timers.
index | timer index |
References TL_ERRNO_MSG, TL_ERROR, TL_MAX_TIMER, TL_NO_ERROR, and tl_timer_reset().
Referenced by tl_timer_reset().