[−][src]Trait nannou::time::DurationF64
An extension for the std::time::Duration
type providing some simple methods for easy access
to an f64
representation of seconds, ms, mins, hrs, and other units of time.
While these measurements make it easier to work with sketches and artworks, it's worth noting that resolution may be lost, especially at high values.
Required methods
Loading content...Provided methods
fn ms(&self) -> f64
A simple way of retrieving the duration in milliseconds.
By default, this is implemented as self.secs() * 1_000.0
.
fn mins(&self) -> f64
A simple way of retrieving the duration as minutes.
fn hrs(&self) -> f64
A simple way of retrieving the duration as hrs.
fn days(&self) -> f64
A simple way of retrieving the duration as days.
fn weeks(&self) -> f64
A simple way of retrieving the duration as weeks.