Changeset 4563 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 08/10/04 16:03:01 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MTime.cc
r4452 r4563 113 113 // -------------------------------------------------------------------------- 114 114 // 115 // Return date as year(y), month(m), day(d). If the time is afternoon 116 // (>=13:00:00) the date of the next day is returned. 117 // 118 void MTime::GetDateOfSunrise(UShort_t &y, Byte_t &m, Byte_t &d) const 119 { 120 MAstro::Mjd2Ymd(fMjd, y, m, d); 121 } 122 123 // -------------------------------------------------------------------------- 124 // 115 125 // Return the time in the range [0h, 24h) = [0h0m0.000s - 23h59m59.999s] 116 126 // … … 227 237 void MTime::Set(const struct timeval &tv) 228 238 { 229 const UInt_t mjd = 1000*tv.tv_sec/kDay + 40587; 239 const UInt_t mjd = (UInt_t)TMath::Floor(1000.*tv.tv_sec/kDay) + 40587; 240 230 241 const Long_t tm = tv.tv_sec%(24*3600)*1000 + tv.tv_usec/1000; 231 242 const UInt_t ms = tv.tv_usec%1000; -
trunk/MagicSoft/Mars/mbase/MTime.h
r3967 r4563 92 92 TString GetFileName() const; 93 93 void GetDate(UShort_t &y, Byte_t &m, Byte_t &d) const; 94 void GetDateOfSunrise(UShort_t &y, Byte_t &m, Byte_t &d) const; 94 95 TTime GetRootTime() const; 95 96 Double_t GetAxisTime() const;
Note:
See TracChangeset
for help on using the changeset viewer.