Skip to content

Instantly share code, notes, and snippets.

@simbesh
Last active November 20, 2022 08:35
Show Gist options
  • Save simbesh/729c955b0ef0ac06f56986518bf85165 to your computer and use it in GitHub Desktop.
Save simbesh/729c955b0ef0ac06f56986518bf85165 to your computer and use it in GitHub Desktop.
use std::time::Instant;
let start = Instant::now();
// ...
let duration = start.elapsed();
println!("Time elapsed in expensive_function() is: {:?}", duration);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment