home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
archiver
/
peek_221.arj
/
TIMERS.H
< prev
next >
Wrap
Text File
|
1992-01-16
|
449b
|
11 lines
/* Macros for implementing simple timers. All timers use 1000ths of
a second, but are only 'accurate' to one clock tick. */
#ifndef CLOCKS_PER_SEC
#define CLOCKS_PER_SEC CLK_TCK
#endif
#define timerset(tmt) (clock_t)((((clock_t)(tmt) * (clock_t)CLOCKS_PER_SEC) / 1000L) + clock())
#define timeup(tmt) ((clock_t)(tmt) < clock())
#define timeleft(tmt) (clock_t)((((clock_t)(tmt) - clock()) / (clock_t)CLOCKS_PER_SEC) * 1000L)