Module time

Module time 

Source
Available on crate features fmt and std only.
Expand description

Formatters for event timestamps.

Structs§

ChronoLocalchrono
Formats local times and UTC times with FormatTime implementations that use the chrono crate.
ChronoUtcchrono
Formats the current UTC time using a formatter from the chrono crate.
LocalTimeunsound_local_offset and local-time
Formats the current local time using a formatter from the time crate.
OffsetTimetime
Formats the current time using a fixed offset and a formatter from the time crate.
Rfc3339
RFC3339 formatter with configurable fractional digits and optional ‘Z’.
SystemClock
System wall-clock now. A Clock that returns std::time::SystemTime::now().
SystemTime
Retrieve and print the current wall-clock time.
Timer
A combinator that implements FormatTime as F(C::now()). Composes a Clock and a TimestampFormatter to implement FormatTime.
UnixMicros
Microseconds since UNIX epoch (UTC), using floor semantics for pre-epoch values.
UnixMillis
Milliseconds since UNIX epoch (UTC), using floor semantics for pre-epoch values.
UnixNanos
Nanoseconds since UNIX epoch (UTC), using floor semantics for pre-epoch values.
UnixSeconds
Seconds since UNIX epoch (UTC), using floor semantics for pre-epoch values.
Uptime
Retrieve and print the relative elapsed wall-clock time since an epoch.
UtcTimetime
Formats the current UTC time using a formatter from the time crate.

Traits§

Clock
Captures the notion of “now” and returns a snapshot value. Captures the notion of time (“now”) and returns a snapshot value.
FormatTime
A type that can measure and format the current time.
TimestampFormatter
Formats a captured snapshot into the Writer without allocating. Formats a captured time snapshot into the writer with no allocations.

Functions§

time
Returns a new SystemTime timestamp provider.
uptime
Returns a new Uptime timestamp provider.