minix/minix/lib/libsys/getticks.c

14 lines
279 B
C
Raw Normal View History

2007-08-07 14:14:04 +02:00
#include "sysutil.h"
/*
* Return the number of clock ticks since system boot. Note that the value may
* wrap on overflow.
*/
clock_t
getticks(void)
2007-08-07 14:14:04 +02:00
{
/* We assume atomic 32-bit field retrieval. TODO: 64-bit support. */
return get_minix_kerninfo()->kclockinfo->uptime;
2007-08-07 14:14:04 +02:00
}