-
3.3.0770f40d9 · ·
[3.3.0] - 2023-06-03 added: * added `StopwatchImpl::saturating_sub_at` and `StopwatchImpl::checked_sub_at` * added written introduction to front-page documentation * added explanation for the `Error` type's `Display` implementation to its documentation changed: * rewrote `Stopwatch` `PartialEq` impl without (unreachable) panicking branches removed: * removed example from front-page documentation
-
3.2.4e56bab17 · ·
[3.2.4] - 2023-04-14 changed: * clarified documentation about overflow for `StopwatchImpl::checked_sub` and `StopwatchImpl::saturating_sub` fixed: * fixed `Eq` implementation for `StopwatchImpl<I>` (derived) restricting `I` to implement `Eq` * fixed `Eq` and `PartialEq` implementation for `Guard<'_, I>` (derived) restricting `I` to implement `Eq` and `PartialEq`, respectively
-
3.2.20d48edab · ·
[3.2.2] - 2023-04-05 fixed: * fixed incorrect `PartialEq` implementation for `StopwatchImpl` * two running stopwatches with different elapsed times compared equal * fixed incorrect `Hash` implementation for `StopwatchImpl` * two running stopwatches with different elapsed times hashed equally * **BREAKING (though warranted for patch):** for `StopwatchImpl<I>` to implement `Hash`, `I` must implement `Hash`
-
3.1.02898cc08 · ·
[3.1.0] - 2023-02-18 added: * added feature flag `time`: Implements `Instant` for `time::Instant`. * added feature flag `coarsetime`: Implements `Instant` for `coarsetime::Instant`. * added `TimeSw` type alias to `StopwatchImpl<time::Instant>` * added `CoarseSw` type alias to `StopwatchImpl<coarsetime::Instant>` * added `SystemSw` type alias to `StopwatchImpl<std::time::SystemTime>` * added `StopwatchImpl::checked_toggle` * added `StopwatchImpl::checked_toggle_at` * added documentation notes about overflow to `StopwatchImpl::toggle` and `StopwatchImpl::toggle_at` changed: * changed overloaded `StopwatchImpl` addition and subtraction to panic on overflow
-
3.0.091176e5f · ·
[3.0.0] - 2023-01-30 added: * added `Instant` trait * added feature flag `nightly`: Depends on the standard library. Implements `std::error::Error` for `Error`. * added feature flag `std`: Implements `core::error::Error` for `Error` if std is not enabled. Requires a nightly compiler. * added feature flag `std_instant`: Implements `Instant` for `std::time::Instant`. * added feature flag `std_systemtime`: Implements `Instant` for `std::time::SystemTime`. * added feature flag `tokio`: Implements `Instant` for `tokio::time::Instant`. * added deprecated `Stopwatch` type alias to `Sw` * added `Sw` type alias to `StopwatchImpl<std::time::Instant>` * added `TokioSw` type alias to `StopwatchImpl<tokio::time::Instant>` * added `StopwatchImpl::new_started_at` * added `StopwatchImpl::set_in_place_at` * added `StopwatchImpl::reset_in_place` * added `StopwatchImpl::reset_in_place_at` * added `StopwatchImpl::replace_at` * added documentation notes about the chronology of `anchor` to the following methods: * `StopwatchImpl::checked_elapsed_at` * `StopwatchImpl::set_in_place_at` * `StopwatchImpl::replace_place_at` * added `Guard::inner` removed: * **BREAKING:** removed `Guard::elapsed` and `Guard::elapsed_at` in favor of `Guard::inner` changed: * **BREAKING:** bumped MSRV to `1.61.0` * renamed `Stopwatch` struct to `StopwatchImpl`
-
2.0.0e8f64c0a · ·
[2.0.0] - 2022-10-07 changed: * BREAKING: changed `Guard::new` to return `libsw::Result<Guard>` * BREAKING: changed `Error` * replaced all variants with `SwStart`, `SwStop`, `SwGuard`, and `GuardNew` * marked `non_exhaustive` * added `Error::expects_running` * added `Error::expects_stopped` * changed `Display` impl * changed `Stopwatch::guard` and `Stopwatch::guard_at` to return `Error::SwGuard` * shortened impl of `Stopwatch::start_at` and `Stopwatch::stop_at` * replaced unreachable unwrap in `Stopwatch::guard_at` with debug assertion * re-licensed under `MIT OR Apache-2.0`