All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Instant. (#110)std::time::Instant due to using a clock source that did not account
for device sleep. (#97)Upkeep starts. (#95)raw-cpuid to 11.0.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)Instant::elapsed() has been added. (#82)Instant::duration_since and Instant::sub now saturates to zero. (#82)Instant::now under high contention has been improved. (#82)std::error::Error for quanta::Error. (#68)window.performance.now() in WASM. (#72)quanta does not track time across system
suspends.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.Mock on MIPS/ARM. (#55)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.raw-cpuid to 10.2 and average to 0.13.atomic-shim to crossbeam-utils for better cross-platform atomic support. (#52)Instant::as_unix_duration as it was added in error.metrics feature flag as metrics-core is no longer a relevant crate.raw-cpuid to 9.0 in order to deal with a RustSec
advisory.Counter.
(#38)Clock::now takes &self instead of &mut self.Instant::now and Instant::recent for getting the current and recent time,
respectively.quanta::with_clock for setting an override on the current thread that affects
calls made to Instant::now and Instant::recent.quanta::set_recent to allow customization of how global recent time is
updated.Instant::as_unix_duration to get the duration of time since the Unix epoch from an
Instant.
clocksource from dependencies and tests as it no longer compiles on stable or nightly.Clock::upkeep for advanced use cases.Error type returned by Upkeep::start.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.
Clock::now now returns a monotonic value in all cases.Clock::delta.Clock instances, running only once when the first Clock
is created.mach for macOS/iOS as it was deprecated in libc.
(#12)core::arch for instrinics, and drop the feature flagged configuration to use it.
(#12)criterion for benchmarking. (#12)Instant type.
(#10)