home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GEMini Atari
/
GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso
/
zip
/
mint
/
mntlib16.lzh
/
MNTLIB16
/
CLOCK.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-03
|
542b
|
24 lines
/* clock -- return process time used so far, in units of CLK_TCK ticks
per second (under TOS, 200 per second) */
/* written by ERS */
#include <time.h>
#include <osbind.h>
extern clock_t _starttime; /* in main.c */
static clock_t now;
/* this must execute in supervisor mode; it fetches the system variable
* containing the number of 200HZ ticks since the system was booted
*/
static void getnow() { now = *((unsigned long *) 0x4ba); }
clock_t
clock()
{
(void)Supexec(getnow);
return (now - _starttime);
}