pub struct ConsoleTimer<'a> { /* private fields */ }
Expand description
A console time measurement.
See ConsoleTimer::scope
for starting a labeled time measurement
of code wrapped in a closure.
Implementations§
Source§impl<'a> ConsoleTimer<'a>
impl<'a> ConsoleTimer<'a>
Sourcepub fn new(label: &'a str) -> ConsoleTimer<'a>
pub fn new(label: &'a str) -> ConsoleTimer<'a>
Starts a console time measurement. The measurement
ends when the constructed ConsoleTimer
object is dropped.
§Example
use gloo_console_timer::ConsoleTimer;
let _timer = ConsoleTimer::new("foo");
Trait Implementations§
Source§impl<'a> Debug for ConsoleTimer<'a>
impl<'a> Debug for ConsoleTimer<'a>
Auto Trait Implementations§
impl<'a> Freeze for ConsoleTimer<'a>
impl<'a> RefUnwindSafe for ConsoleTimer<'a>
impl<'a> Send for ConsoleTimer<'a>
impl<'a> Sync for ConsoleTimer<'a>
impl<'a> Unpin for ConsoleTimer<'a>
impl<'a> UnwindSafe for ConsoleTimer<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more