There are many ways to do a timer. It is not hard but you need to think exactly what you want. If you want to call a callback, you usually use a thread that sleep until your delay is elapsed, before calling your callback. If you don't want to use a thread, you can call periodically a checker function that compute the time delta.
You api will be a function taking the delay and a function pointer plus the callback parameters. It will launch a thread that will sleep for the delay, then call the callback with the given parameters.
Check general purpose libraries, they usually have timers implemented (gtk+ glib, boost::timer I think).
my2c
Edit:
For the portability part, you have of course to write two versions of your timer function. If you use thread that means it is better to use a lib. As libs give you timers ... Use a lib :)