A high resolution timer library for purebasic written with C language.
The lib use the object system from purebasic (thanks to freak for the help).
link (18/03/2012): http://www.mediafire.com/?47a3t5v9h8pl877
first version: http://www.mediafire.com/?l669u97uxdd314v (x64 only)
readme.txt
usage:
to compile the lib you will need:
- windows sdk v7.1
- purebasic v4.60
start WinSDK Console (x64|x86).bat
to build and install the lib type nmake
to clean the folder type nmake clean
Don't forget to check the makefile for the names and paths
thanks to freak and Danilo for the help
-xorc1zt
functions :
GetTimeProcess( Resolution ) - Return the process elasped time.
GetTimeSys( Resolution ) - Return the system elasped time.
GetTimeDelta( Resolution ) - Return the elasped time since the previous call
CreateTimer( ID [, Time [, Resolution]] ) - Create a new timer ( Default resolution is millisecond )
FreeTimer( ID ) - Delete the timer
IsTimer( ID ) - Verifiy if ID is a timer object
ExamineTimers() - Update the timers
TimerSetInterval( ID, Time, Resolution ) - Set the interval time
TimerSetCallback( ID, FunctionAddress ) - Set the callback function
TimerGetStatus( ID ) - Return the status of timer
TimerGetInterval( ID ) - Return the interval time of the timer
TimerGetResolution( ID ) - Return the resolution of the timer
resolutions :
#PB_TIME_SECOND = 1
#PB_TIME_DECISECOND = 2
#PB_TIME_CENTISECOND = 3
#PB_TIME_MILLISECOND = 4
#PB_TIME_MICROSECOND = 5
#PB_TIME_NANOSECOND = 6
timer status :
#PB_TIMERSTATUS_WAIT = 1
#PB_TIMERSTATUS_RING = 2