#include <CalibTime.h>
Inheritance diagram for CalibData::CalibTime:
Public Member Functions | |
ITime::AbsoluteTime | absoluteTime () const |
absoluteTime, seconds, etc. are needed to satisfy ITime interface | |
ITime::AbsoluteTime | absoluteTime () const |
absoluteTime, seconds, etc. are needed to satisfy ITime interface | |
CalibTime (const ITime &time) | |
CalibTime (double julianDate) | |
CalibTime (const facilities::Timestamp &stamp) | |
CalibTime () | |
CalibTime (const ITime &time) | |
CalibTime (double julianDate) | |
CalibTime (const facilities::Timestamp &stamp) | |
CalibTime () | |
ITime::DimensionedTime | days () const |
ITime::DimensionedTime | days () const |
long int | getClibTime () const |
long int | getClibTime () const |
double | getJulian () const |
Return julian date. | |
double | getJulian () const |
Return julian date. | |
double | getNano () const |
double | getNano () const |
std::string | getString () const |
Return string representation of time, not including nanoseconds;. | |
std::string | getString () const |
Return string representation of time, not including nanoseconds;. | |
ITime::DimensionedTime | hours () const |
ITime::DimensionedTime | hours () const |
ITime::DimensionedTime | minutes () const |
ITime::DimensionedTime | minutes () const |
bool | operator!= (const Timestamp &other) const |
bool | operator!= (const ITime &other) const |
bool | operator!= (const ITime &other) const |
ITime & | operator+= (const ITime &other) |
ITime & | operator+= (const ITime &other) |
ITime & | operator-= (const ITime &other) |
ITime & | operator-= (const ITime &other) |
bool | operator< (const Timestamp &other) const |
bool | operator< (const ITime &other) const |
bool | operator< (const ITime &other) const |
bool | operator<= (const Timestamp &other) const |
bool | operator<= (const ITime &other) const |
bool | operator<= (const ITime &other) const |
bool | operator== (const Timestamp &other) const |
bool | operator== (const ITime &other) const |
bool | operator== (const ITime &other) const |
bool | operator> (const Timestamp &other) const |
bool | operator> (const ITime &other) const |
bool | operator> (const ITime &other) const |
bool | operator>= (const Timestamp &other) const |
bool | operator>= (const ITime &other) const |
bool | operator>= (const ITime &other) const |
std::ostream & | printOut (std::ostream &) const |
std::ostream & | printOut (std::ostream &) const |
ITime::DimensionedTime | seconds () const |
ITime::DimensionedTime | seconds () const |
Protected Attributes | |
int | m_nano |
Save fractional seconds separately (associated with m_time). | |
time_t | m_time |
internal binary rep of time; count seconds from Jan 1, 1970 |
|
00010 : Timestamp() {}
|
|
00012 : 00013 facilities::Timestamp(stamp) {}
|
|
00015 : facilities::Timestamp(julianDate) 00016 {}
|
|
00020 { 00021 longlong absTime = time.absoluteTime(); 00022 m_time = absTime / billion; 00023 m_nano = absTime - (m_time * billion); 00024 }
|
|
|
|
|
|
|
|
|
|
absoluteTime, seconds, etc. are needed to satisfy ITime interface
|
|
absoluteTime, seconds, etc. are needed to satisfy ITime interface
00043 { 00044 ITime::AbsoluteTime abs = m_time; 00045 abs *= billion; 00046 abs += m_nano; 00047 return abs; 00048 }
|
|
00036 {return seconds()/86400.0;}
|
|
00036 {return seconds()/86400.0;}
|
|
00088 {return m_time;}
|
|
00088 {return m_time;}
|
|
Return julian date.
|
|
Return julian date.
00099 { 00100 double julian = (m_time + m_nano/inverseNano)/secPerDay; 00101 julian += julian1970; 00102 return julian; 00103 }
|
|
00087 {return m_nano;}
|
|
00087 {return m_nano;}
|
|
Return string representation of time, not including nanoseconds;.
|
|
Return string representation of time, not including nanoseconds;.
00092 { 00093 std::string str; 00094 00095 toString(m_time, str); 00096 return str; 00097 }
|
|
00035 {return seconds()/3600.0;}
|
|
00035 {return seconds()/3600.0;}
|
|
00034 {return seconds()/60.0;}
|
|
00034 {return seconds()/60.0;}
|
|
00118 { 00119 return (!(*this == other)); 00120 }
|
|
|
|
00062 { 00063 facilities::Timestamp me = *this; 00064 CalibTime otherCalib(other); 00065 return (me != otherCalib); 00066 }
|
|
|
|
00026 { 00027 /* *this = this->facilities::Timestamp::operator+=(CalibTime(other)); 00028 return *this; 00029 */ 00030 throw facilities::BadTimeInput 00031 ("CalibData::CalibTime Unsupported timestamp operation +="); 00032 }
|
|
|
|
00034 { 00035 /* *this = this->facilities::Timestamp::operator-=(CalibTime(other)); 00036 return *this; 00037 */ 00038 throw facilities::BadTimeInput 00039 ("CalibData::CalibTime Unsupported timestamp operation -="); 00040 }
|
|
00090 { 00091 return ((m_time < other.m_time) || 00092 ((m_time == other.m_time) && (m_nano < other.m_nano))); 00093 }
|
|
|
|
00080 { 00081 facilities::Timestamp me = *this; 00082 CalibTime otherCalib(other); 00083 return (me < otherCalib); 00084 }
|
|
00100 { 00101 return ( !(other < (*this)) ); 00102 }
|
|
|
|
00068 { 00069 facilities::Timestamp me = *this; 00070 CalibTime otherCalib(other); 00071 return (me <= otherCalib); 00072 }
|
|
|
|
Reimplement operations for ITime interface using facilities::Timestamp implementation |
|
Reimplement operations for ITime interface using facilities::Timestamp implementation 00056 { 00057 facilities::Timestamp me = *this; 00058 CalibTime otherCalib(other); 00059 return (me == otherCalib); 00060 }
|
|
00095 { 00096 return (other < (*this)); 00097 00098 }
|
|
|
|
00086 { 00087 facilities::Timestamp me = *this; 00088 CalibTime otherCalib(other); 00089 return (me > otherCalib); 00090 }
|
|
00104 {
00105 return ( !( (*this) < other ) );
00106 }
|
|
|
|
00074 { 00075 facilities::Timestamp me = *this; 00076 CalibTime otherCalib(other); 00077 return (me >= otherCalib); 00078 }
|
|
|
|
00092 { 00093 return o << getString(); 00094 }
|
|
|
|
00050 { 00051 ITime::DimensionedTime dim = m_nano / 1000000000.0; 00052 dim += m_time; 00053 return dim; 00054 }
|
|
Save fractional seconds separately (associated with m_time).
|
|
internal binary rep of time; count seconds from Jan 1, 1970
|