WOscSystemTime Class Reference

#include <WOscTimeTag.h>

List of all members.

Public Member Functions

virtual WOscTimeTag GetSystemTime () const

Detailed Description

Implementation of the system time. Every system using this library can inherit its own specific class and override the getSystemTime() - member-function. If not overridden (using the base class (this one :)), see WOscSystemTime::GetSystemTime() for details.

Definition at line 59 of file WOscTimeTag.h.

Member Function Documentation

WOscTimeTag WOscSystemTime::GetSystemTime (  )  const [virtual]

Returns the system time. When not overridden in a derived class, it returns largest time tag possible.

Time representing the current system time.
Time tags are represented by a 64 bit fixed point number. The first 32 bits specify the number of seconds since midnight on January 1, 1900, and the last 32 bits specify fractional parts of a second to a precision of about 200 picoseconds. This is the rep- resentation used by Internet NTP timestamps. The time tag value consisting of 63 zero bits followed by a one in the least signifigant bit is a special case meaning "immediately."

Definition at line 71 of file WOscTimeTag.cpp.

References WOscTimeTag::GetLargestTimeTag().

Referenced by WOscTimeTag::GetCurrentTime(), and WOscTimeTag::SetToCurrentTime().

00072 {
00074     /* The time.h lib states:
00075      * "" time_t  time ( time_t * timer ); ""
00076      * Get the number of seconds elapsed since 00:00 hours,
00077      * Jan 1, 1970 UTC from the system clock.
00078      */
00079     WOscTimeTag systemTime;
00080     systemTime.m_timeTag = (uint64_t)time(NULL) + SECONDS_FROM_1900_TO_1970;
00081     return systemTime;
00082 #else
00083     return WOscTimeTag::GetLargestTimeTag();
00084 #endif
00085 }

The documentation for this class was generated from the following files:
Generated on Sat Oct 23 03:05:59 2010 for WOscLib by  doxygen 1.6.3