pub trait TimeSpanNumExt {
// Required methods
fn nanoseconds(self) -> TimeSpan;
fn microseconds(self) -> TimeSpan;
fn milliseconds(self) -> TimeSpan;
fn seconds(self) -> TimeSpan;
fn minutes(self) -> TimeSpan;
fn hours(self) -> TimeSpan;
fn days(self) -> TimeSpan;
}Expand description
This trait adds methods to integers to convert values into TimeSpans.
Required Methods§
Sourcefn nanoseconds(self) -> TimeSpan
fn nanoseconds(self) -> TimeSpan
Convert integer value into TimeSpan with that amount of nanoseconds.
Sourcefn microseconds(self) -> TimeSpan
fn microseconds(self) -> TimeSpan
Convert integer value into TimeSpan with that amount of microseconds.
Sourcefn milliseconds(self) -> TimeSpan
fn milliseconds(self) -> TimeSpan
Convert integer value into TimeSpan with that amount of milliseconds.