summaryrefslogtreecommitdiff
path: root/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'timer.c')
-rw-r--r--timer.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/timer.c b/timer.c
index 8941ab7..c25d5b2 100644
--- a/timer.c
+++ b/timer.c
@@ -1,3 +1,4 @@
+#include <unistd.h>
#include <sys/time.h>
#include "timer.h"
@@ -11,3 +12,8 @@ void set_itimer_interval_value(struct itimerval *itimer, unsigned long sec,
itimer->it_value.tv_sec = sec;
itimer->it_value.tv_usec = usec;
}
+
+int get_user_hz(void)
+{
+ return sysconf(_SC_CLK_TCK);
+}