#instant #atomic #duration-types


Library for times and durations with fixed-size representations

11 unstable releases (5 breaking)

0.7.0 Aug 24, 2023
0.6.0 Jan 15, 2023
0.5.0 Jun 27, 2019
0.4.0 Mar 18, 2018
0.2.0 Aug 27, 2016

#50 in Date and time

Download history 1202/week @ 2023-08-10 1112/week @ 2023-08-17 953/week @ 2023-08-24 809/week @ 2023-08-31 771/week @ 2023-09-07 762/week @ 2023-09-14 1004/week @ 2023-09-21 913/week @ 2023-09-28 806/week @ 2023-10-05 1292/week @ 2023-10-12 2192/week @ 2023-10-19 3668/week @ 2023-10-26 3432/week @ 2023-11-02 3558/week @ 2023-11-09 3635/week @ 2023-11-16 2398/week @ 2023-11-23

13,437 downloads per month
Used in 9 crates (6 directly)


1.5K SLoC


rustcommon is a collection of common libraries we use in our Rust projects. This includes datastructures, logging, metrics, timers, and ratelimiting.


rustcommon is a workspace repository which contains several crates (libraries) which act as foundational libraries for other Rust projects, such as Pelikan, rpc-perf, and Rezolus.

Each crate within this repository contains its own readme and changelog detailing the purpose and history of the library.

Getting Started


rustcommon is built with the standard Rust toolchain which can be installed and managed via rustup or by following the directions on the Rust website.

Clone and build rustcommon from source

git clone https://github.com/pelikan-io/rustcommon
cd rustcommon

# run tests
cargo test --all


Create a new issue on GitHub.


A full list of contributors can be found on GitHub.


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.


~15K SLoC