libtime++: Date and time calculation

◆ example7()

void example7 ( )

Definition at line 286 of file example++.cc.

References PRINTVALUE, and libtime::time2double().

Referenced by main().

287 {
288  cout << "\n"
289  << "Example 7: Convenient ways to specify times\n"
290  << "----------\n"
291  << "\n";
292 
293  PRINTVALUE( Hours(6) );
294  PRINTVALUE( 118*Days()+4*Hours()+10*Minutes() );
295  PRINTVALUE( Minutes(34.123456) );
296  PRINTVALUE( Minutes(34,123,456) );
297  PRINTVALUE( Seconds(34.123456) );
298  PRINTVALUE( Seconds(34,123,456) );
299  PRINTVALUE( Seconds(90072) );
300  PRINTVALUE( 2.5*Days() );
301  PRINTVALUE( Days(2.5) );
302  PRINTVALUE( Seconds(2.5*time2double(Days())) );
303 }
double time2double(const TRelativeTime &rtime)
convert relative time to seconds
Definition: convert.cc:59
provide a convenient way to specify time intervals in the order of one hour
Definition: libtime++.h:550
provide a convenient way to specify time intervals in the order of one day
Definition: libtime++.h:537
#define PRINTVALUE(V)
Definition: example++.cc:38
provide a convenient way to specify time intervals in the order of one minute
Definition: libtime++.h:563
provide a convenient way to specify time intervals in the order of one second
Definition: libtime++.h:575
Here is the call graph for this function:
Here is the caller graph for this function: