Re: pause/resume timer



On Mon, Oct 20, 2003 at 11:12:57PM +0200, Johannes Wei??l wrote:
On 2003-10-20 23:07:10, G Hasse wrote:
Timers is a very operating system dependent thing.

Layers above the operating system tries to give a uniform
access to some concepts.

Hmm ... that's bad. I have to write a physical simulation
in school, and need a very precise and portable timer ...

is there a library like glib which provides portable
timer functions?!


In POSIX there is gettimeofday() and in Win32 there is GetTickCount().
On Win32, GetTickCount() will give better than microsecond precision.
The precision on linux and *BSD depends on the architecture. On most
architectures, including i386, the entire one microsecond resolution
of the datatype will be usable.

If you dig into the glib source code you should be able to determine the
suitability of the GTimer interface to your application.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]