Public Member Functions | Static Public Member Functions | Static Public Attributes

dtn::utils::Clock Class Reference

#include <Clock.h>

List of all members.

Public Member Functions

 Clock ()
virtual ~Clock ()

Static Public Member Functions

static size_t getTime ()
static bool isExpired (size_t timestamp, size_t lifetime=0)
static size_t getExpireTime (size_t timestamp, size_t lifetime)

Static Public Attributes

static int timezone = 0
static u_int32_t TIMEVAL_CONVERSION = 946684800
static float quality = 0

Detailed Description

Definition at line 17 of file Clock.h.


Constructor & Destructor Documentation

dtn::utils::Clock::Clock (  ) 

Definition at line 23 of file Clock.cpp.

dtn::utils::Clock::~Clock (  )  [virtual]

Definition at line 27 of file Clock.cpp.


Member Function Documentation

size_t dtn::utils::Clock::getExpireTime ( size_t  timestamp,
size_t  lifetime 
) [static]

Definition at line 31 of file Clock.cpp.

References quality.

size_t dtn::utils::Clock::getTime (  )  [static]
bool dtn::utils::Clock::isExpired ( size_t  timestamp,
size_t  lifetime = 0 
) [static]

Definition at line 43 of file Clock.cpp.

References getTime(), and quality.

Here is the call graph for this function:


Member Data Documentation

float dtn::utils::Clock::quality = 0 [static]

Defines an estimation about the precision of the local time. If the clock is definitely wrong the value is zero and one when we have a perfect time sync. Everything between one and zero gives an abstract knowledge about the quality of time.

Definition at line 38 of file Clock.h.

Referenced by dtn::data::BundleList::expire(), getExpireTime(), isExpired(), and dtn::core::BundleCore::raiseEvent().

u_int32_t dtn::utils::Clock::TIMEVAL_CONVERSION = 946684800 [static]

The number of seconds between 1/1/1970 and 1/1/2000.

Definition at line 31 of file Clock.h.

Referenced by getTime().

int dtn::utils::Clock::timezone = 0 [static]

Definition at line 29 of file Clock.h.

Referenced by getTime(), and setGlobalVars().


The documentation for this class was generated from the following files: