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

#62 in Date and time

Download history 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 148442/week @ 2024-10-29 161204/week @ 2024-11-05 144870/week @ 2024-11-12 129498/week @ 2024-11-19 52091/week @ 2024-11-26

515,400 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