|
Gaudi Framework, version v21r8 |
| Home | Generated: 17 Mar 2010 |
#include <GaudiKernel/Time.h>

Public Types | |
| typedef longlong | ValueType |
Public Member Functions | |
| TimeSpan (void) | |
| Initialize an empty (zero) time difference. | |
| TimeSpan (Time t) | |
| Initialize a time span from Time t. | |
| TimeSpan (ValueType nsecs) | |
| Initialize a time span to a specific length. | |
| TimeSpan (ValueType secs, int nsecs) | |
| Initialise a time span to a specific length. | |
| TimeSpan (int days, int hours, int mins, int secs, int nsecs) | |
| Initialise a time span to a specific length. | |
| int | days (void) const |
| Get the number of complete days in the span. | |
| int | hours (void) const |
| Get the number of complete hours in the span. | |
| int | minutes (void) const |
| Get the number of complete minutes in the span. | |
| ValueType | seconds (void) const |
| Get the number of complete seconds in the span. | |
| int | lastHours (void) const |
| Get the number of complete hours in the last incomplete day of the span. | |
| int | lastMinutes (void) const |
| Get the number of complete minutes in the last incomplete hour of the span. | |
| int | lastSeconds (void) const |
| Get the number of complete seconds in the last incomplete minute of the span. | |
| int | lastNSeconds (void) const |
| Get the number of nanoseconds in the last incomplete second of the span. | |
| TimeSpan & | operator+= (const TimeSpan &x) |
| Add to a time span. | |
| TimeSpan & | operator-= (const TimeSpan &x) |
| Subtract from a time span. | |
| TimeSpan & | operator*= (const TimeSpan &n) |
| Multiply a time span. | |
| TimeSpan & | operator/= (const TimeSpan &n) |
| Divide a time span. | |
| TimeSpan & | operator%= (const TimeSpan &n) |
| Compute a modulo of a time span. | |
| ValueType | ns (void) const |
| Return the time span as nanoseconds. | |
Private Attributes | |
| ValueType | m_nsecs |
Friends | |
| class | Time |
A difference between two Time values. In addition to supporting normal integer artihmetic and comparisons, the span can also be converted to a number useful units.
Definition at line 57 of file Time.h.
| Gaudi::TimeSpan::TimeSpan | ( | void | ) | [inline] |
| Gaudi::TimeSpan::TimeSpan | ( | Time | t | ) | [inline] |
| Gaudi::TimeSpan::TimeSpan | ( | ValueType | nsecs | ) | [inline] |
| Gaudi::TimeSpan::TimeSpan | ( | ValueType | secs, | |
| int | nsecs | |||
| ) | [inline] |
Initialise a time span to a specific length.
The value is initialised to the sum of the parts---the parts do not need to fall into their "natural" ranges. The values are normalised to the natural meanings (e.g. 1000 seconds - 500 nanoseconds), so be careful with signs if you are producing values from other sources.
| secs | Seconds. | |
| nsecs | Nanoseconds. |
Definition at line 90 of file Time.icpp.
00091 : m_nsecs(secs * Time::SEC_NSECS + nsecs) {}
| Gaudi::TimeSpan::TimeSpan | ( | int | days, | |
| int | hours, | |||
| int | mins, | |||
| int | secs, | |||
| int | nsecs | |||
| ) | [inline] |
Initialise a time span to a specific length.
The value is initialised to the sum of the parts---the parts do not need to fall into their "natural" ranges. The values are normalised to the natural meanings (e.g. 1000 seconds - 500 nanoseconds), so be careful with signs if you are producing values from other sources.
| days | Whole days. | |
| hours | Whole hours. | |
| mins | Whole minutes. | |
| secs | Whole seconds. | |
| nsecs | Nanoseconds. |
Definition at line 104 of file Time.icpp.
00104 { 00105 m_nsecs = (secs + 60 * (mins + 60 * (hours + 24*days)))*Time::SEC_NSECS + nsecs; 00106 }
| int Gaudi::TimeSpan::days | ( | void | ) | const [inline] |
| int Gaudi::TimeSpan::hours | ( | void | ) | const [inline] |
| int Gaudi::TimeSpan::minutes | ( | void | ) | const [inline] |
| TimeSpan::ValueType Gaudi::TimeSpan::seconds | ( | void | ) | const [inline] |
| int Gaudi::TimeSpan::lastHours | ( | void | ) | const [inline] |
| int Gaudi::TimeSpan::lastMinutes | ( | void | ) | const [inline] |
| int Gaudi::TimeSpan::lastSeconds | ( | void | ) | const [inline] |
| int Gaudi::TimeSpan::lastNSeconds | ( | void | ) | const [inline] |
| TimeSpan::ValueType Gaudi::TimeSpan::ns | ( | void | ) | const [inline] |