dropclock
This crate provides DropClock, a guard type that captures
std::time::Instant::now() on creation and, when dropped, passes that
instant to a user-provided closure. Useful for timing scopes, logging
elapsed durations, or recording metrics without manual bookkeeping.
use DropClock;
let _timer = new;
// ... your code here ...
// closure fires when _timer is dropped
License
Licensed under either of Apache License, Version 2.0 or MIT License at your option.