[SDL] Re: Why not nanosleep()?
f91-men at nada.kth.se
Tue Apr 4 09:18:33 PDT 2000
>advantage would be in avoiding a system call. With the typical use of
>"gettime()"-type functions, this would be a very useful saving I think.
I tend to do a lot of gettimeofday()s in my code, so I was worried about
their cost and profiled. It turned out to be quite insignificant.
Not to say that it always is, though --- it can still be useful for
measuring performance of very short code snippets which are hard to
get accurate readings for otherwise.
More information about the SDL