timer?
Is there some kind of function in svgalib or c/c++ that works like sleep, but more precise? (sleep is pretty useless since it is limited to whole seconds)
December 26, 1999 02:37 PM
The accepted solution to a high resolution timer is to use the select system call.
int select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
The last value is a timeout that is measured in sub seconds. When the value runs out, it returns.
This solution is also fairly portable to other unix platforms.
-Mike
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement