void senf:: | ||||
formatClockServiceInterval | ( | ClockService::clock_type | interval, | |
std::ostream & | os | ) | ||
Definition at line 83 of file ClockService.cc.
void senf:: | ||||
parseClockServiceInterval | ( | console::ParseCommandInfo::TokensRange const & | tokens, | |
ClockService::clock_type & | out | ) | ||
Console argument parser to parse value as time interval.
This parser will parse a time interval specification into a ClockService::clock_type value. The following units are supported:
d |
days |
h |
hours |
m |
minutes |
s |
seconds |
Additionally, the unit may be prefixed by an SI scale:
m |
milli |
u |
micro |
n |
nano |
An optional decimal point is also supported. A single timer interval may combine any number of these specifications. The following are all valid intervals:
10d |
10 days |
5d5d |
10 days |
1d2h100m3.5s |
27 hours, 30 minutes and 3.5 seconds |
1s100ms |
1.1 seconds |
1.1s |
1.1 seconds |
123.456us |
123.456 microseconds |
2md |
(very unusual) 2 milli-days |
Definition at line 38 of file ClockService.cc.