you are trying to write a user application using kernel function, which is not possible. write your code as a kernel loadable module
Or use POSIX timers, <time.h>, timer_create and friends ...
~velco
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/