Changeset 2384 for trunk/MagicSoft/Cosy/base
- Timestamp:
- 10/15/03 17:28:35 (21 years ago)
- Location:
- trunk/MagicSoft/Cosy/base
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/base/log.h
r920 r2384 1 #ifndef LOG_H2 #define LOG_H1 #ifndef COSY_Log 2 #define COSY_Log 3 3 4 4 #include <ostream.h> 5 5 6 #ifndef MARS_MLog 6 7 #include "MLog.h" 8 #endif 7 9 8 10 //#ifndef __CINT__ -
trunk/MagicSoft/Cosy/base/timer.h
r2278 r2384 10 10 friend ostream &operator<<(ostream &out, Timer &t); 11 11 private: 12 double fMs; 13 double fDiv;12 double fMs; // Microsec in units of sec as returned by gettimeofday 13 int fSecs; // Seconds as returned by gettimeofday 14 14 15 int fSec; 16 int fSecs; 17 int fMin; 18 int fHor; 19 int fDay; 20 int fMon; 21 int fYea; 15 int fSec; // Sec of time 16 int fMin; // Min of time 17 int fHor; // Hor of time 18 int fDay; // Day of time 19 int fMon; // Mon of time 20 int fYea; // Yea of time 22 21 23 double fMjd; 22 double fDiv; // Division of day 23 double fMjd; // MJD 24 24 25 25 char fDateStr[30]; … … 28 28 29 29 public: 30 Timer() : fMs(0), fSec(0), fSecs(0), fMin(0), fHor(0), fDay(0), fMon(0), fYea(0), fMjd(0) {} 30 Timer(int d, int m, int y, int h, int min, int s, double ms) 31 : fMs(ms), fSecs(0), fSec(s), fMin(m), fHor(h), fDay(d), fMon(m), fYea(y), fDiv(0), fMjd(0) {} 32 Timer() : fMs(0), fSecs(0), fSec(0), fMin(0), fHor(0), fDay(0), fMon(0), fYea(0), fDiv(0), fMjd(0) {} 31 33 Timer(double t); 32 34 Timer(struct timeval *tv); … … 35 37 void SetTimer(int tv_sec, double tv_usec); 36 38 void SetTimer(const struct timeval *tv); 39 void SetTimer(int y, int m, int d, int h, int min, int s, double ms) 40 { 41 fMs = ms; 42 fSec = s; 43 fMin = min; 44 fHor = h; 45 fDay = d; 46 fMon = m; 47 fYea = y; 48 } 37 49 38 50 void GetTimeval(struct timeval *tv) const; … … 52 64 int M() const { return fMin; } 53 65 int S() const { return fSec; } 66 int MilliSec() const { return (int)(fMs*1000); } 67 double MicroSec() const { return fMs; } 54 68 55 69 const char *GetTimeStr();
Note:
See TracChangeset
for help on using the changeset viewer.