Crate dia_time[−][src]
A small time kit
Project
- Repository: https://bitbucket.org/haibison/dia-time
- License: Free Public License 1.0.0
- This project follows Semantic Versioning 2.0.0
Features
- Constants as seconds:
MINUTE
,HOUR
,DAY
,WEEK
. - Constants as milliseconds:
millis::SECOND
,millis::MINUTE
,millis::HOUR
,millis::DAY
,millis::WEEK
. - Constants as microseconds:
micros::SECOND
,micros::MINUTE
,micros::HOUR
,micros::DAY
,micros::WEEK
. - Constants as nanoseconds:
nanos::SECOND
,nanos::MINUTE
,nanos::HOUR
,nanos::DAY
,nanos::WEEK
. - Other modules:
decis
,centis
,picos
,femtos
,attos
,zeptos
,yoctos
. - And some helper functions for formatting time...
References
Modules
attos |
Some constants in attoseconds |
centis |
Some constants in centiseconds |
decis |
Some constants in deciseconds |
femtos |
Some constants in femtoseconds |
micros |
Some constants in microseconds |
millis |
Some constants in milliseconds |
nanos |
Some constants in nanoseconds |
picos |
Some constants in picoseconds |
symbols |
Symbols |
yoctos |
Some constants in yoctoseconds |
zeptos |
Some constants in zeptoseconds |
Constants
CRATE_CODE_NAME |
Crate code name |
CRATE_NAME |
Crate name |
CRATE_RELEASE_DATE |
Crate release date (year/month/day) |
CRATE_VERSION |
Crate version |
DAY |
1 day in seconds |
DECASECOND |
1 decasecond |
EXASECOND |
1 exasecond |
GIGASECOND |
1 gigasecond |
HECTOSECOND |
1 hectosecond |
HOUR |
1 hour in seconds |
KILOSECOND |
1 kilosecond |
MEGASECOND |
1 megasecond |
MINUTE |
1 minute in seconds |
PETASECOND |
1 petasecond |
SECOND |
1 second |
TAG |
Tag, which can be used for logging... |
TERASECOND |
1 terasecond |
UUID |
Unique universally identifier of this crate. Its CRC-32 is
|
WEEK |
1 week in seconds |
YOTTASECOND |
1 yottasecond |
ZETTASECOND |
1 zettasecond |
Functions
duration_to_dhms |
Converts duration to days, hours, minutes, seconds. |
format_dhms |
Examples:
|
format_dhmss |
Examples:
|
format_hms |
Examples:
|
format_hmss |
Examples:
|
smart_format_dhms |
If the duration is within a day, forwards to
|
smart_format_dhmss |
If the duration is within a day, forwards to
|