00001 #ifndef baciTime_H 00002 #define baciTime_H 00003 00004 /******************************************************************* 00005 * ALMA - Atacama Large Millimiter Array 00006 * (c) European Southern Observatory, 2004 00007 * 00008 *This library is free software; you can redistribute it and/or 00009 *modify it under the terms of the GNU Lesser General Public 00010 *License as published by the Free Software Foundation; either 00011 *version 2.1 of the License, or (at your option) any later version. 00012 * 00013 *This library is distributed in the hope that it will be useful, 00014 *but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 *Lesser General Public License for more details. 00017 * 00018 *You should have received a copy of the GNU Lesser General Public 00019 *License along with this library; if not, write to the Free Software 00020 *Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00021 * 00022 * "@(#) $Id: baciTime.h,v 1.97 2006/09/01 02:20:54 cparedes Exp $" 00023 * 00024 * who when what 00025 * -------- ---------- ---------------------------------------------- 00026 * msekoran 2001/03/12 modified 00027 */ 00028 00036 #ifndef __cplusplus 00037 #error This is a C++ include file and cannot be used from plain C 00038 #endif 00039 00040 #include <baciExport.h> 00041 #include <baciTypes.h> 00042 00043 namespace baci { 00044 00053 #if defined (ACE_LACKS_LONGLONG_T) 00054 static const CORBA::ULongLong UTCtoUNIXTimeBaseOffset (0xD8539C80, 2); 00055 // (Lower 32 bits of the offset in hex, Upper 32 bits of the offset in hex) 00056 #else 00057 static const CORBA::ULongLong UTCtoUNIXTimeBaseOffset = ACE_UINT64_LITERAL(0x2D8539C80); 00058 #endif 00059 00064 typedef BACITimeStamp TimeStamp; 00069 typedef BACITimeInterval TimeInterval; 00070 00076 TimeStamp getTimeStamp(); 00077 00084 TimeInterval getTime(); 00085 00091 ACE_CString getStringifiedTimeStamp(); 00092 00096 ACE_Time_Value UTCtoACE_Time_Value(const TimeStamp &time); 00097 00098 00104 ACE_CString getStringifiedUTC(TimeInterval time); 00105 00106 }; 00107 00108 #endif /* baciTime_H */ 00109