grub/grub-core/osdep/unix/cputime.c
Vladimir 'phcoder' Serbinenko 7e45abcef4 Move cpu time retrieval to separate grub_util_get_cpu_time_ms
and remove export.h.
2013-10-15 13:13:53 +02:00

15 lines
260 B
C

#include <config.h>
#include <config-util.h>
#include <sys/times.h>
#include <unistd.h>
#include <grub/emu/misc.h>
grub_uint64_t
grub_util_get_cpu_time_ms (void)
{
struct tms tm;
times (&tm);
return (tm.tms_utime * 1000ULL) / sysconf(_SC_CLK_TCK);
}