#include <WOscTimeTag.h>
Public Member Functions | |
virtual WOscTimeTag | GetSystemTime () const |
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.
WOscTimeTag WOscSystemTime::GetSystemTime | ( | ) | const [virtual] |
Returns the system time. When not overridden in a derived class, it returns largest time tag possible.
Definition at line 71 of file WOscTimeTag.cpp.
References WOscTimeTag::GetLargestTimeTag().
Referenced by WOscTimeTag::GetCurrentTime(), and WOscTimeTag::SetToCurrentTime().
00072 { 00073 #if WOSC_HAS_STD_TIME_LIB 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 }