[][src]Crate dia_time

A small time kit

Project

Features

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

version_info

3.0.0 (August 19th, 2019)

yoctos

Some constants in yoctoseconds

zeptos

Some constants in zeptoseconds

Macros

local_time

Gets local time

Constants

CODE_NAME

Crate code name

DAY

1 day in seconds

DECASECOND

1 decasecond

EXASECOND

1 exasecond

GIGASECOND

1 gigasecond

HECTOSECOND

1 hectosecond

HOUR

1 hour in seconds

ID

ID of this crate

KILOSECOND

1 kilosecond

MEGASECOND

1 megasecond

MINUTE

1 minute in seconds

NAME

Crate name

PETASECOND

1 petasecond

RELEASE_DATE

Crate release date (year/month/day)

SECOND

1 second

TAG

Tag, which can be used for logging...

TERASECOND

1 terasecond

VERSION

Crate version

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: 9d, 02:53:58

format_dhms_ms

Examples: 3d, 02:53:58.018

format_hms

Examples: 02:53:58

format_hmss

Examples: 02:53:58.018

smart_format_dhms

If the duration is within a day, forwards to ::format_hms(); otherwise, forwards to ::format_dhms().

smart_format_dhms_ms

If the duration is within a day, forwards to ::format_hmss(); otherwise, forwards to ::format_dhms_ms().