libtime++: Date and time calculation

◆ time2double()

double libtime::time2double ( const TRelativeTime rtime)

convert relative time to seconds

Definition at line 59 of file convert.cc.

References libtime::TRelativeTime::days(), libtime::TBaseClassTime::float_second(), libtime::TBaseClassTime::hour(), and libtime::TBaseClassTime::minute().

Referenced by example7(), and main().

60 {
61  double retval(0.);
62  retval=rtime.float_second();
63  retval += 60.*rtime.minute();
64  retval += 3600.*rtime.hour();
65  retval += 24.*3600.*rtime.days();
66  return(retval);
67 } // double time2float(const TRelativeTime&)
Here is the call graph for this function:
Here is the caller graph for this function: