[ prev :: next :: up ] libgg-current (3)

Portable Time Routines

Name

ggCurTime, ggUSleep, ggUSlumber : Portable Time Routines

Synopsis

#include <ggi/gg.h>

int ggCurTime(struct timeval *tv);

int ggUSleep(int usecs);

void ggUSlumber(int usecs);

Description

ggCurTime fills the timeval structure pointed to by tv with the current time to the best precision available on the executing platform.

ggUSleep sleeps for at least usec microseconds, to the best precision available on the executing platform, but may be woken up by a signal or other unspecified condition.

ggUSlumber does the same thing as ggUSleep, but is guaranteed not to return until the alloted time has elapsed.

All times represent wall-clock (real, versus processor) times.

The above routines are often simple macros rather than functions, and as such should not be used by reference.

Return value

ggCurTime returns 0 on success, or a non-zero value if there was an error.

ggUSleep returns 0 when the alloted time interval has elapsed, or a non-zero value if the sleep was interrupted.

 
[ prev :: next :: up ] libgg-current (3)
2004/03/10 22:43:57