14 unstable releases (6 breaking)

0.8.1 Jan 23, 2024
0.8.0 Dec 15, 2023
0.7.1 Dec 15, 2023
0.7.0 Aug 24, 2023
0.2.0 Aug 27, 2016

#60 in Date and time

Download history 76942/week @ 2024-07-23 77226/week @ 2024-07-30 78299/week @ 2024-08-06 100963/week @ 2024-08-13 106593/week @ 2024-08-20 87194/week @ 2024-08-27 106217/week @ 2024-09-03 117756/week @ 2024-09-10 105341/week @ 2024-09-17 129422/week @ 2024-09-24 122438/week @ 2024-10-01 146270/week @ 2024-10-08 135748/week @ 2024-10-15 159691/week @ 2024-10-22 148468/week @ 2024-10-29 130316/week @ 2024-11-05

592,088 downloads per month
Used in 17 crates (6 directly)

MIT/Apache

82KB
1.5K SLoC

This crate provides time and duration types with fixed-size representations with either coarse or precise resolution. This allows for using these types in places where a known size is required.

The internal representations also trade decreased representable ranges in exchange for smaller types. This makes them appealing for short timescales when smaller sized types are beneficial, such as in item metadata.

Since the internal representations use a single 32bit or 64bit value, math operations on the types are cheaper than they are with the standard time types.

Dependencies

~0.7–1MB
~15K SLoC