1 #ifndef __XrdSysTimer__
2 #define __XrdSysTimer__
37 #include "XrdSys/XrdWin32.hh"
47 struct timeval *
Delta_Time(
struct timeval &tbeg);
49 static time_t
Midnight(time_t tnow=0);
51 inline int TimeLE(time_t tsec) {
return StopWatch.tv_sec <= tsec;}
56 unsigned long Report(
double &);
57 unsigned long Report(
unsigned long &);
58 unsigned long Report(
unsigned long long &);
59 unsigned long Report(
struct timeval &);
61 inline void Reset() {gettimeofday(&StopWatch, 0);}
63 inline time_t
Seconds() {
return StopWatch.tv_sec;}
65 inline void Set(
struct timeval &tod)
66 {StopWatch.tv_sec = tod.tv_sec;
67 StopWatch.tv_usec = tod.tv_usec;
70 static void Snooze(
int seconds);
72 static char *
s2hms(
int sec,
char *buff,
int blen);
76 static void Wait(
int milliseconds);
83 struct timeval StopWatch;
84 struct timeval LastReport;
86 unsigned long Report();
static void Wait4Midnight()
static char * s2hms(int sec, char *buff, int blen)
static time_t Midnight(time_t tnow=0)
struct timeval * Delta_Time(struct timeval &tbeg)
static void Snooze(int seconds)
void Set(struct timeval &tod)
static void Wait(int milliseconds)