GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

timeval.hh File Reference

GTimeVal C++ interface. More...

#include <gfc/object.hh>
#include <glib/gtypes.h>
#include <gfc/glib/inline/timeval.inl>

Go to the source code of this file.

Namespaces

Classes

Time Methods

TimeVal addition operators

TimeVal subtraction operators


Detailed Description

GTimeVal C++ interface.

Provides TimeVal, an object that represents a precise time, with seconds and microseconds. Same as the struct timeval returned by the gettimeofday() UNIX call.


Function Documentation

TimeVal get_current_time  ) 
 

Equivalent to the UNIX gettimeofday() function, but portable.

Returns:
A TimeVal object that stores the current time.

void usleep unsigned long  microseconds  ) 
 

Pauses execution of the current thread for the given number of microseconds.

Parameters:
microseconds The number of microseconds to pause.

There are 1 million microseconds per second (represented by the G_USEC_PER_SEC macro). This method may have limited precision, depending on hardware and operating system; don't rely on the exact length of the sleep.


Generated on Tue Aug 24 00:04:56 2004 for GFC-Core by doxygen 1.3.8