mirror of
https://github.com/rosenpass/rosenpass.git
synced 2026-02-27 22:13:12 -08:00
chore(examples): add examples to docs
Signed-off-by: Paul Spooren <mail@aparcar.org>
This commit is contained in:
@@ -5,6 +5,16 @@ use std::time::Instant;
|
||||
/// This is a simple wrapper around `std::time::Instant` that provides a
|
||||
/// convenient way to get the seconds elapsed since the creation of the
|
||||
/// `Timebase` instance.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use rosenpass_util::time::Timebase;
|
||||
///
|
||||
/// let timebase = Timebase::default();
|
||||
/// let now = timebase.now();
|
||||
/// assert!(now > 0.0);
|
||||
/// ```
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Timebase(Instant);
|
||||
|
||||
Reference in New Issue
Block a user