PackageTrack
Sign in Get early access

quanta

high-speed timing library

0.12.6 138M downloads/mo #660 most downloaded on crates.io metrics-rs/quanta

What this package is like to depend on

Last release 1 years ago

10 Jun 2025

Ships fairly regularly

a new release about every 3 months

Most releases are documented

notes for 29 of 33 stable releases

2 versions withdrawn

withdrawn after publishing

8 years old

38 releases · first in 2019

0 releases in the last 12 months

see the full history below

Release timeline

38 releases · Jan 2019 to Jun 2025
2020 2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 38
  1. 0.12.6 10 Jun 2025
    Release notes

    chore: Release quanta version 0.12.6

    Open source →
    Release notes

    Fixed

    • Avoid potential divide by zero in calibration loop. (#113)
    Open source →
  2. 0.12.5 01 Jan 2025
    Release notes

    chore: Release quanta version 0.12.5

    Open source →
    Release notes

    Fixed

    • Fixed an issue with lossy truncation in checked arithemtic methods for Instant. (#110)
    Open source →
  3. 0.12.4 13 Dec 2024
    Release notes

    chore: Release quanta version 0.12.4

    Open source →
    Release notes

    Fixed

    • Updated WASM support to work in WebWorkers. (#107)
    Open source →
  4. 0.12.3 31 Mar 2024
    Release notes

    chore: Release quanta version 0.12.3

    Open source →
    Release notes

    Changed

    • Disabled counter support on iOS targets even if AArch64 is present. This is due to an issue where the necessary CPU instruction for reading the counter is not available on iOS.
    Open source →
  5. 0.12.2 31 Dec 2023
    Release notes

    (cargo-release) quanta version 0.12.2

    Open source →
    Release notes

    Fixed

    • Fixed an issue with the monotonic clock for macOS/iOS where it would undermeasure time compared to what would be measured by std::time::Instant due to using a clock source that did not account for device sleep. (#97)
    Open source →
  6. 0.12.1 31 Oct 2023
    Release notes

    (cargo-release) quanta version 0.12.1

    Open source →
    Release notes

    Fixed

    • Populate global recent time before Upkeep starts. (#95)
    Open source →
  7. 0.12.0 04 Oct 2023
    Release notes

    (cargo-release) quanta version 0.12.0

    Open source →
    Release notes

    Added

    • Experimental support for ARM. (#91)

    Changed

    • Update raw-cpuid to 11.0.
    Open source →
  8. 0.11.1 28 May 2023
    Release notes

    (cargo-release) quanta version 0.11.1

    Open source →
    Release notes

    Added

    • Added a new method, Clock::delta_as_nanos, for getting the delta between two raw measurements as the whole number of nanoseconds instead of the initial conversion to Duration. (#86)
    Open source →
  9. 0.11.0 24 Mar 2023
    Release notes

    (cargo-release) quanta version 0.11.0

    Open source →
    Release notes

    Added

    • Instant::elapsed() has been added. (#82)

    Changed

    • Instant::duration_since and Instant::sub now saturates to zero. (#82)
    • Performance of Instant::now under high contention has been improved. (#82)
    Open source →
  10. 0.10.1 20 Jul 2022
    Release notes

    (cargo-release) quanta version 0.10.1

    Open source →
    Release notes

    Added

    • Implement std::error::Error for quanta::Error. (#68)

    Changed

    • Fixed build issue on x86/x86_64 platforms that did not have SSE.
    • Fix scaling factor for window.performance.now() in WASM. (#72)
    Open source →
  11. 0.10.0 18 May 2022
    Release notes

    Changed

    • Documentation has been updated to reflect that quanta does not track time across system suspends.
    • Fixed a panic in the calibration loop if a certain edge case with TSC measurements is encountered.
    • Updated a unit test that was frequently flaky to be more precise.

    Removed

    • Instant::as_u64 has been removed. As it provided direct access to an value that could fundamentally change from version-to-version, it felt like time to remove that footgun and push users more towards the API that mimics std::time.
    • Clock::upkeep has been removed. It doesn't need to exist on Clock directly, as we have had the quanta::set_recent free function for a while now, and was just duplicating that.
    • Clock::start and Clock::end have been removed. They saw limited usage and overall just added somewhat needless API clutter given that users who are looking to do ultra-precise timing will either want more control or use another technique such as instruction counting.
    Open source →
  12. 0.9.3 16 Sep 2021
    Release notes

    Added

    • CI tests for MIPS/ARM. (#55)

    Changed

    • Fixed compilation issue with Mock on MIPS/ARM. (#55)
    • Simplified how TSC/RDTSC suppoort is detected, which should avoid some situations where it was assumed to be present, but actually was not. (#57)
    Open source →
  13. 0.9.2 25 Aug 2021
    Release notes

    Changed

    • Pinned crossbeam-utils to v0.8.5 where AtomicCell::fetch_update was introduced to fix, which fixes broken builds where Cargo chooses a version between 0.8.0 and 0.8.5.
    • Update raw-cpuid to 10.2 and average to 0.13.
    Open source →
  14. 0.9.1 12 Aug 2021
    Release notes

    Changed

    • Switched from atomic-shim to crossbeam-utils for better cross-platform atomic support. (#52)
    Open source →
  15. 0.9.0 17 Jun 2021
    Release notes

    Added

    • Support for WASM/WASI targets. (#45)
    Open source →
  16. 0.8.0 07 Jun 2021
    Release notes

    Removed

    • Instant::as_unix_duration as it was added in error.
    • metrics feature flag as metrics-core is no longer a relevant crate.
    Open source →
  17. 0.7.2 25 Jan 2021
    Release notes

    Changed

    • Bumped dependency on raw-cpuid to 9.0 in order to deal with a RustSec advisory.
    Open source →
  18. 0.7.1 24 Jan 2021
    Release notes

    Fixed

    • Incorrect method visibility for non-SSE2 implementation of Counter. (#38)
    Open source →
  19. 0.7.0 03 Jan 2021
    Release notes

    Changed

    • MSRV bumped to 1.45.0.
    • Clock::now takes &self instead of &mut self.
    • Fixed a bug where a failure to spawn the upkeep thread would not allow subsequent attempts to spawn the upkeep thread to proceed.

    Added

    • New methods --Instant::now and Instant::recent for getting the current and recent time, respectively.
    • New free function quanta::with_clock for setting an override on the current thread that affects calls made to Instant::now and Instant::recent.
    • New free function quanta::set_recent to allow customization of how global recent time is updated.
    Open source →
  20. 0.6.6-alpha.1 22 Sep 2020 pre-release

    Nothing published for this version

  21. 0.6.5 16 Sep 2020
    Release notes

    Changed

    • Fixed a bug with not being able to start the upkeep thread at all. (#29)
    Open source →
  22. 0.6.4 27 Aug 2020
    Release notes

    Added

    • Add Instant::as_unix_duration to get the duration of time since the Unix epoch from an Instant.

      Changed

    • Remove clocksource from dependencies and tests as it no longer compiles on stable or nightly.
    Open source →
  23. 0.6.3 03 Aug 2020
    Release notes

    Changed

    • Publicly expose Clock::upkeep for advanced use cases.
    • Relax constraints around checking for multiple sockets. (#25)
    Open source →
  24. 0.6.2 21 Jul 2020
    Release notes

    Added

    • Add support for MIPS/PowerPC. (#23)
    Open source →
  25. 0.6.1 13 Jul 2020
    Release notes

    Added

    • Publicly expose the Error type returned by Upkeep::start.
    Open source →
  26. 0.6.0 06 Jul 2020
    Release notes

    This version of quanta was a massive overhaul of man areas of the API and internals, which was done in a single PR: (#19). You can read the PR description for the finer details. All changes below are part of the aforementioned PR.

    Changed

    • Clock::now now returns a monotonic value in all cases.
    • No longer possible to get a negative value from Clock::delta.
    • Calibration is no longer a fixed one second loop, and will complete when it detects it has a statistically viable calibration ratio, or when it exceeds 200ms of wall-clock time. In most cases, it should complete in under 10ms.
    • Calibration is now shared amongst all Clock instances, running only once when the first Clock is created.
    Open source →
  27. 0.5.3-alpha.2 03 Jun 2020 pre-release

    Nothing published for this version

  28. 0.5.3-alpha.1 26 May 2020 pre-release

    Nothing published for this version

  29. 0.5.2 01 May 2020
    Release notes

    Changed

    • Fix the logic to figure out when calibration is required. (#14)
    Open source →
  30. 0.5.1 12 Apr 2020 withdrawn
    Release notes

    Changed

    • Small tweak to the docs.
    Open source →
  31. 0.5.0 12 Apr 2020 withdrawn
    Release notes

    Changed

    • Switch to mach for macOS/iOS as it was deprecated in libc. (#12)
    • Switch to core::arch for instrinics, and drop the feature flagged configuration to use it. (#12)
    • Switch to criterion for benchmarking. (#12)
    Open source →
  32. 0.4.1 25 Feb 2020

    Nothing published for this version

  33. 0.4.0 20 Feb 2020
    Release notes

    Changed

    • Differentiate between raw and scaled time by adding a new Instant type. (#10)
    Open source →
  34. 0.3.2 21 Jul 2020

    Nothing published for this version

  35. 0.3.1 02 Jun 2019

    Nothing published for this version

  36. 0.3.0 27 May 2019

    Nothing published for this version

  37. 0.2.0 10 Mar 2019
    Release notes

    Changed

    • Fixed support for Windows. It was in a bad way, but actually works correctly now!
    • Switched to Azure Pipelines CI + Cirrus CI, including formatting, tests, and benchmarks, for Linux, macOS, Windows, and FreeBSD.
    Open source →
  38. 0.1.0 14 Jan 2019
    Release notes

    Added

    • Initial commit.

    <!-- next-url --> [Unreleased]: https://github.com/metrics-rs/quanta/compare/v0.12.6...HEAD [0.12.6]: https://github.com/metrics-rs/quanta/compare/v0.12.5...v0.12.6 [0.12.5]: https://github.com/metrics-rs/quanta/compare/v0.12.4...v0.12.5 [0.12.4]: https://github.com/metrics-rs/quanta/compare/v0.12.3...v0.12.4 [0.12.3]: https://github.com/metrics-rs/quanta/compare/v0.12.2...v0.12.3 [0.12.2]: https://github.com/metrics-rs/quanta/compare/v0.12.1...v0.12.2 [0.12.1]: https://github.com/metrics-rs/quanta/compare/v0.12.0...v0.12.1 [0.12.0]: https://github.com/metrics-rs/quanta/compare/v0.11.1...v0.12.0 [0.11.1]: https://github.com/metrics-rs/quanta/compare/v0.11.0...v0.11.1 [0.11.0]: https://github.com/metrics-rs/quanta/compare/v0.10.1...v0.11.0 [0.10.1]: https://github.com/metrics-rs/quanta/compare/v0.10.0...v0.10.1 [0.10.0]: https://github.com/metrics-rs/quanta/releases/tag/v0.10.0

    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive