pub struct TimeTracker { /* private fields */ }
Implementations§
Source§impl TimeTracker
impl TimeTracker
Sourcepub fn new() -> TimeTracker
pub fn new() -> TimeTracker
Sourcepub fn add(&mut self, delta: f64)
pub fn add(&mut self, delta: f64)
Add time to the time tracker. This is typically something you’d call each time there’s a process(delta).
§Examples
use babalcore::*;
let mut tt = TimeTracker::new();
tt.add(0.01);
assert_eq!(0.01, tt.now_sec());
Trait Implementations§
Source§impl Clone for TimeTracker
impl Clone for TimeTracker
Source§fn clone(&self) -> TimeTracker
fn clone(&self) -> TimeTracker
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TimeTracker
impl Debug for TimeTracker
Source§impl Default for TimeTracker
impl Default for TimeTracker
Source§fn default() -> TimeTracker
fn default() -> TimeTracker
Returns the “default value” for a type. Read more
Source§impl Display for TimeTracker
impl Display for TimeTracker
impl Copy for TimeTracker
Auto Trait Implementations§
impl Freeze for TimeTracker
impl RefUnwindSafe for TimeTracker
impl Send for TimeTracker
impl Sync for TimeTracker
impl Unpin for TimeTracker
impl UnwindSafe for TimeTracker
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