Inheritance diagram for lfc::HiResTimeSpan::
Public Methods | |
HiResTimeSpan () throw () | |
HiResTimeSpan (const HiResTimeSpan &ts) throw () | |
HiResTimeSpan (long msecs) | |
creates an object with the period specified in milliseconds. More... | |
HiResTimeSpan (long msecs, long seconds, long minutes=0, long hours=0, long days=0) | |
virtual | ~HiResTimeSpan () throw () |
virtual long | milliseconds () const throw () |
| |
virtual long | seconds () const throw () |
| |
virtual long | minutes () const throw () |
| |
virtual long | hours () const throw () |
| |
virtual long | days () const throw () |
| |
virtual bool | operator== (const HiResTimeSpan &ts) const throw () |
virtual bool | operator< (const HiResTimeSpan &ts) const throw () |
virtual const HiResTimeSpan & | operator= (const HiResTimeSpan &ts) throw () |
virtual const HiResTimeSpan | operator+ (const HiResTimeSpan &ts) const |
virtual const HiResTimeSpan | operator- (const HiResTimeSpan &ts) const |
virtual void | writeObject (BinaryOutput &stream) const |
platform independent serialization. More... | |
virtual void | readObject (BinaryInput &stream) |
platform independent deserialization. More... | |
virtual void | formatObject (TextOutput &stream, string format="") const |
formatting based on a certain format. More... | |
virtual void | scanObject (TextInput &stream, string format="") |
scanning based on a certain format. More... | |
Static Public Methods | |
const HiResTimeSpan | currentProcessTime () |
Protected Attributes | |
long | m_span |
See Chronometer example for a code sample.
|
|
|
|
|
creates an object with the period specified in milliseconds.
|
|
creates an object specifing how many days, hours, minutes, seconds and milliseconds the time span takes, so:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
platform independent serialization.
Reimplemented from lfc::_Serializable. |
|
platform independent deserialization.
Reimplemented from lfc::_Serializable. |
|
formatting based on a certain format. The format must be as follows:
Symbol Meaning Presentation Example ------ ------- ------------ ------- D in days Number 2.5 d floor(days) Number 2 H in hours Number 15.25 h floor(hours) Number 15 M in minutes Number 37.9 m floor(minutes) Number 37 S in seconds Number 125.75 s floor(seconds) Number 125 ms in milliseconds Number 1038 -d days(0..24) Number 2 -h hours(0..23) Number 12 -m minutes(0..59) Number 50 -s seconds(0..59) Number 43 -ms msecs(0..999) Number 532 ' escape for text Text 'milliseconds' '' single quote Text ' Any characters in the pattern that are not in this formatting list will be treated as quoted text. For instance, characters like ':', ',', '.', ' ', '#' and '@' will appear in the resulting time text even they are not embraced within single quotes. Examples:
Format Pattern Result -------------- ------ "S 'secs; ' ms 'msecs'" ->> "12.5 secs; 12500 msecs" "-m 'mins', -s 'secs' and -ms 'msecs'" ->> "2 mins, 12 secs and 580 msecs" Reimplemented from lfc::_Formatable. |
|
scanning based on a certain format.
The format used for scanning is identical to that used for formatting and if the format or the data coming from the stream are invalid, an HiResTimeSpanException will be thrown.
Reimplemented from lfc::_Scanable. |
|
|
|
|