[][src]Crate unix_time

A minimal crate to play with Instant based on UNIX epoch.

The standard library provides Instant and Duration structures to measure elapsed time. This is fine for most use cases, but the Instant structure voluntary hides its implementation to keep its semantics. This crate exposes its time base to the UNIX Epoch (1st January 1970 at 0:00).

The exposed API tries to mimic as much as possible the std::time one for the related Instant structures, such that passing from these to the ones of this crate would be as seamless as possible (as it actually uses std::time under the hood).

This crate should only be used to compute local time. It is thus not appropriate for timezone computations, playing with dates,...



An precise instant relative to the UNIX epoch, with nanosecond precision.