src/util.cpp File Reference

#include "config.h"
#include <sys/time.h>
#include <boost/thread/mutex.hpp>
#include "Exception.h"
#include "mathutil.h"
#include "util.h"

Include dependency graph for util.cpp:

Go to the source code of this file.

Functions

timeval GetTimeOfDayWrapper ()
void pcce::SleepMs (tMillisecond time)
 Cross-platform sleep function.
tMillisecond pcce::GetTimeSinceStart ()
 Returns the time in milliseconds since the application was started.

Variables

static boost::mutex gCurrentMutex
static tMillisecond gLastTime = 0
static timeval gStartTime = GetTimeOfDayWrapper()


Function Documentation

timeval GetTimeOfDayWrapper (  ) 

Definition at line 121 of file util.cpp.

References PCCE_CHECK.

00121                               {
00122   timeval time;
00123   PCCE_CHECK(gettimeofday(&time, NULL) == 0, "gettimeofday failed");
00124   return time;
00125 }


Variable Documentation

boost::mutex gCurrentMutex [static]

Definition at line 58 of file util.cpp.

Referenced by pcce::GetTimeSinceStart().

tMillisecond gLastTime = 0 [static]

Definition at line 61 of file util.cpp.

Referenced by pcce::GetTimeSinceStart().

timeval gStartTime = GetTimeOfDayWrapper() [static]

Definition at line 66 of file util.cpp.

Referenced by pcce::GetTimeSinceStart().


Generated on Thu Mar 6 11:39:25 2008 for Protocce by  doxygen 1.5.5