4 #include "TTimeStamp.h"
47 : fSec(source.fSec), fNanoSec(source.fNanoSec) { }
51 if (
this != &source) {fSec = source.
fSec; fNanoSec = source.
fNanoSec;}
57 : fSec(ts.tv_sec), fNanoSec(ts.tv_nsec)
58 { NormalizeNanoSec(); }
62 : fSec(t), fNanoSec(nsec)
63 { NormalizeNanoSec(); }
78 UInt_t day, UInt_t hour,
79 UInt_t
min, UInt_t sec,
81 Bool_t isUTC=kTRUE, Int_t secOffset=0);
86 Bool_t isUTC=kTRUE, Int_t secOffset=0);
96 : fSec((Int_t)seconds), fNanoSec((Int_t)((seconds-fSec)*1.0e9))
97 { NormalizeNanoSec(); }
109 operator double()
const {
return fSec + 1.0e-9 * fNanoSec; }
113 timespec_t GetTimeSpec()
const
114 { timespec_t
value = {fSec,fNanoSec};
return value; }
117 time_t
GetSec(
void)
const {
return fSec;}
122 Double_t
GetSeconds(
void)
const {
return fSec+(fNanoSec/1.0e9); }
156 const char*
AsString(Option_t* option=
"")
const;
161 Int_t GetDate(Bool_t inUTC=kTRUE, Int_t secOffset=0,
162 UInt_t* year=0, UInt_t* month=0,
163 UInt_t* day=0)
const;
167 Int_t GetTime(Bool_t inUTC=kTRUE, Int_t secOffset=0,
168 UInt_t* hour=0, UInt_t*
min=0,
169 UInt_t* sec=0)
const;
172 void Add(Double_t seconds);
174 void Print(Option_t* option=
"")
const;
180 static Int_t GetZoneOffset();
192 static time_t MktimeFromUTC(tm_t* tmstruct);
194 static Bool_t IsLeapYear(Int_t year);
196 static void DumpTMStruct(
const tm_t& tmstruct);
201 void Set(Int_t year, Int_t month, Int_t day,
202 Int_t hour, Int_t
min, Int_t sec,
203 Int_t nsec, Bool_t isUTC, Int_t secOffset);
204 void Set(Int_t date, Int_t
time, Int_t nsec,
205 Bool_t isUTC, Int_t secOffset);
206 void NormalizeNanoSec();
267 #endif // VADTIMESTAMP_H