At the moment I'm working on a project where I need a timer that works beside my main application. I'm working on Ubuntu 8.10 distro, with NetBeans IDE with the C/C++ plugin. I want to work with a statemachine where every timerinterval a state is executed. I tried browsing the man-pages for Linux and Ubuntu and stumbled over the timer_create() and timer_createfd() functions, but no where a working example. How can I create a timer and how to handle the interrupt?