|
commore
1.0.6-SNAPSHOT
|
#include <Time.h>
Public Member Functions | |
| TimePeriod (Long seconds, long num_ms_or_um=0L, bool is_millisecond=true) | |
| TimePeriod (long days, long hours, long minutes, long seconds, long num_ms_or_um=0L, bool is_millisecond=true) | |
| TimePeriod (const timeval &time) | |
| TimePeriod (const TimePeriod &original) | |
| TimePeriod & | operator= (const Long &time) |
| TimePeriod & | operator= (const timeval &time) |
| TimePeriod & | operator= (const TimePeriod &original) |
| operator timeval () const | |
| long | to_days () const |
| long | to_hours () const |
| long | to_minutes () const |
| long | to_seconds () const |
| long | days () const |
| long | hours () const |
| long | minutes () const |
| long | seconds () const |
| long | microseconds () const |
| long | milliseconds () const |
| Long | to_microseconds () const |
| Long | to_milliseconds () const |
| void | time_period (Long seconds, long num_ms_or_um=0L, bool is_millisecond=true) |
| void | time_period (long days, long hours, long minutes, long seconds, long num_ms_or_um=0L, bool is_millisecond=true) |
| void | time_period (const timeval &time) |
| AString | to_string () const |
| AString | to_string_full_precision () const |
| bool | from_string (const AChar *s) |
| void | write (OBStream &stream) const |
| long | read_xml (IBStream &stream) |
| long | write_xml (OBStream &stream) const |
| long | read (const CommBuffer &buf) |
| long | write (CommBuffer &buf) const |
| TimePeriod | operator+ (const TimePeriod &time) const |
| TimePeriod | operator- (const TimePeriod &time) const |
| TimePeriod | operator- () const |
| TimePeriod & | operator+= (const TimePeriod &time) |
| TimePeriod & | operator-= (const TimePeriod &time) |
| TimePeriod | operator* (long value) const |
| TimePeriod | operator/ (long value) const |
| TimePeriod | operator% (long value) const |
| TimePeriod & | operator*= (long value) |
| TimePeriod & | operator/= (long value) |
| TimePeriod & | operator%= (long value) |
| bool | operator< (const TimePeriod &time) const |
| bool | operator<= (const TimePeriod &time) const |
| bool | operator> (const TimePeriod &time) const |
| bool | operator>= (const TimePeriod &time) const |
| bool | operator== (const TimePeriod &time) const |
| bool | operator!= (const TimePeriod &time) const |
| int | compare (const TimePeriod &p) const |
Static Public Member Functions | |
| static bool | is_microsecond (long microsecond) |
Friends | |
| class | Date |
| class | Time |
| class | TimeDate |
Type time duration
| commore::TimePeriod::TimePeriod | ( | Long | seconds, |
| long | num_ms_or_um = 0L, |
||
| bool | is_millisecond = true |
||
| ) |
| seconds | number of seconds in time period |
| num_ms_or_um | number of miliseconds or microseconds |
| is_millisecond | if true num_ms_or_um is a number of milliseconds, if false it is a number of microseconds |
| commore::TimePeriod::TimePeriod | ( | long | days, |
| long | hours, | ||
| long | minutes, | ||
| long | seconds, | ||
| long | num_ms_or_um = 0L, |
||
| bool | is_millisecond = true |
||
| ) |
| days | a number of day in time period |
| hours | a number of hours |
| minutes | a number of minute |
| seconds | a number of second |
| num_ms_or_um | number of miliseconds or microseconds |
| is_millisecond | if true nums is a number of milliseconds |
| commore::TimePeriod::TimePeriod | ( | const timeval & | time | ) |
| time | a timeval value |
| long commore::TimePeriod::days | ( | ) | const |
| bool commore::TimePeriod::from_string | ( | const AChar * | s | ) |
Assign time period with string content. Format: ddd:hh:mm:ss.qqqqqq
| s |
| long commore::TimePeriod::hours | ( | ) | const |
|
static |
| microsecond |
| long commore::TimePeriod::microseconds | ( | ) | const |
| long commore::TimePeriod::milliseconds | ( | ) | const |
| long commore::TimePeriod::minutes | ( | ) | const |
| TimePeriod commore::TimePeriod::operator+ | ( | const TimePeriod & | time | ) | const |
Operator on time period
| long commore::TimePeriod::read | ( | const CommBuffer & | buf | ) |
Read time period from communication buffer
| long commore::TimePeriod::read_xml | ( | IBStream & | stream | ) |
Read time period from text stream. Format: ddd:hh:mm:ss.qqq
| long commore::TimePeriod::seconds | ( | ) | const |
| void commore::TimePeriod::time_period | ( | Long | seconds, |
| long | num_ms_or_um = 0L, |
||
| bool | is_millisecond = true |
||
| ) |
Assign a time period
| seconds | a number of seconds |
| num_ms_or_um | number of miliseconds or microseconds |
| is_millisecond | if true num_ms_or_um is a number of milliseconds |
| void commore::TimePeriod::time_period | ( | long | days, |
| long | hours, | ||
| long | minutes, | ||
| long | seconds, | ||
| long | num_ms_or_um = 0L, |
||
| bool | is_millisecond = true |
||
| ) |
Assign a time period
| days | a number of day in time period |
| hours | a number of hours |
| minutes | a number of minute |
| seconds | a number of seconds |
| num_ms_or_um | number of miliseconds or microseconds |
| is_millisecond | if true num_ms_or_um is a number of milliseconds |
| void commore::TimePeriod::time_period | ( | const timeval & | time | ) |
Assign a time period
| time | a timeval value |
| long commore::TimePeriod::to_days | ( | ) | const |
| long commore::TimePeriod::to_hours | ( | ) | const |
| Long commore::TimePeriod::to_microseconds | ( | ) | const |
| Long commore::TimePeriod::to_milliseconds | ( | ) | const |
| long commore::TimePeriod::to_minutes | ( | ) | const |
| long commore::TimePeriod::to_seconds | ( | ) | const |
| AString commore::TimePeriod::to_string | ( | ) | const |
| AString commore::TimePeriod::to_string_full_precision | ( | ) | const |
| void commore::TimePeriod::write | ( | OBStream & | stream | ) | const |
Write time period to text stream. Format: ddd:hh:mm:ss.qqq
| long commore::TimePeriod::write | ( | CommBuffer & | buf | ) | const |
Write time period to communication buffer
| long commore::TimePeriod::write_xml | ( | OBStream & | stream | ) | const |
Write time period to text stream. Format: ddd:hh:mm:ss.qqq