#include <acscommonC.h>
#include <SString.h>
#include <OS_NS_time.h>
Go to the source code of this file.
Functions | |
ACS::Time | getTimeStamp () |
ACS::TimeInterval | getTime () |
ACE_CString | getStringifiedTimeStamp () |
ACE_Time_Value | UTCtoACE_Time_Value (const ACS::Time &time) |
ACE_CString | getStringifiedUTC (ACS::TimeInterval time) |
Variables | |
static const CORBA::ULongLong | UTCtoUNIXTimeBaseOffset = ACE_UINT64_LITERAL(0x2D8539C80) |
Header file for rudimentary time helper functions.
ACE_CString getStringifiedTimeStamp | ( | ) |
Get current time in ISO8601 format
ACE_CString getStringifiedUTC | ( | ACS::TimeInterval | time | ) | [inline] |
Returns UTC time in the ISO8601 format
References UTCtoACE_Time_Value(), and UTCtoUNIXTimeBaseOffset.
Referenced by baciTestCBpattern::done(), baciTestCBfloat::done(), baciTestCBdouble::done(), baciTestCBpattern::working(), baciTestCBfloat::working(), and baciTestCBdouble::working().
ACS::TimeInterval getTime | ( | ) |
Get current time in UTC format Should be used only as relative time, this is NOT in UTC format (for performance)
ACS::Time getTimeStamp | ( | ) |
Get current time in UTC format
Referenced by TestDevIO::read(), DevIOMem< T >::read(), DevIOTime::read(), LongDevIO::read(), TestDevIO::write(), DevIOMem< T >::write(), DevIOTime::write(), and LongDevIO::write().
ACE_Time_Value UTCtoACE_Time_Value | ( | const ACS::Time & | time | ) | [inline] |
Referenced by getStringifiedUTC().
const CORBA::ULongLong UTCtoUNIXTimeBaseOffset = ACE_UINT64_LITERAL(0x2D8539C80) [static] |
DESCRIPTION: Time stamp representation.
Representation of a time stamp coincides with OMG's representation of time, i.e. it represents the number of 100-nanosecond intervals since 15th October 1582 00:00:00. See "CORBAServices: Common Object Services Specification" (ftp://ftp.omg.org/pub/doc/formal/98-12-09.pdf), chapter 14.
This method returns the current system time in UTC format.
UNIX systems use 1st Jan. 1970 as the Base Time. The CORBA Time Service uses the Universal Time Coordinated (UTC) representation of time from the X/Open DCE Time Service. The UTC time signals broadcast by the WWV radio station of the National Bureau of Standards deliver time that is easier to handle in this representation. UTC time is defined as :
Time Units : 100 nanosecs Base Time : 15th October 1582 00:00:00 Approximate range : AD 30,000 To construct the UTC time from UNIX time we need to add the difference of days between 15th October 1582 and 1st Jan 1970. This difference is 141427 days or 0x2D8539C80 secs.
Referenced by getStringifiedUTC().