pub struct ElapsedTime {
pub start_time: Instant,
/* private fields */
}Expand description
Record elapsed time functionality 记录耗时的功能
Fields§
§start_time: InstantImplementations§
Source§impl ElapsedTime
impl ElapsedTime
Sourcepub fn print_limit(&self, limit: Duration) -> Option<String>
pub fn print_limit(&self, limit: Duration) -> Option<String>
Print logs if total time exceeds limit 如果总时间超过限制则打印日志
Trait Implementations§
Source§impl Clone for ElapsedTime
impl Clone for ElapsedTime
Source§fn clone(&self) -> ElapsedTime
fn clone(&self) -> ElapsedTime
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ElapsedTime
impl Debug for ElapsedTime
Auto Trait Implementations§
impl Freeze for ElapsedTime
impl RefUnwindSafe for ElapsedTime
impl Send for ElapsedTime
impl Sync for ElapsedTime
impl Unpin for ElapsedTime
impl UnwindSafe for ElapsedTime
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)