Changeset 4563 for trunk/MagicSoft/Mars/mbase/MTime.cc
- Timestamp:
- 08/10/04 16:03:01 (20 years ago)
- File:
-
- 1 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;
Note:
See TracChangeset
for help on using the changeset viewer.