If you intend to write a GPL-licensed, opensource and multiplatform program in C or C++ and you want to use a timer, look here:
Timer function code for Linux and Windows
With this library, you can use GCC on Linux and MinGW on windows to use a timer without the need to make any changes in your sourcecode.
Regards.