xref: /minix/minix/lib/libsys/getticks.c (revision 0a6a1f1d)
1 #include "sysutil.h"
2 
3 /*
4  * Return the number of clock ticks since system boot.  Note that the value may
5  * wrap on overflow.
6  */
7 clock_t
8 getticks(void)
9 {
10 
11 	/* We assume atomic 32-bit field retrieval.  TODO: 64-bit support. */
12 	return get_minix_kerninfo()->kclockinfo->uptime;
13 }
14