mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-24 00:00:11 +02:00
docs: fixed links in tokio-timer (#844)
* docs: fixed links in tokio-timer/src/timer/mod.rs * docs: fixed links in tokio-timer::clock
This commit is contained in:
committed by
Sean McArthur
parent
733d432b80
commit
eec370cae8
@@ -10,8 +10,11 @@ use std::time::Instant;
|
||||
|
||||
/// A handle to a source of time.
|
||||
///
|
||||
/// `Clock` instances return `Instant` values corresponding to "now". The source
|
||||
/// of these values is configurable. The default source is `Instant::now()`.
|
||||
/// `Clock` instances return [`Instant`] values corresponding to "now". The source
|
||||
/// of these values is configurable. The default source is [`Instant::now`].
|
||||
///
|
||||
/// [`Instant`]: https://doc.rust-lang.org/std/time/struct.Instant.html
|
||||
/// [`Instant::now`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.now
|
||||
#[derive(Default, Clone)]
|
||||
pub struct Clock {
|
||||
now: Option<Arc<Now>>,
|
||||
@@ -69,8 +72,10 @@ impl Clock {
|
||||
}
|
||||
}
|
||||
|
||||
/// Return a new `Clock` instance that uses `Instant::now()` as the source
|
||||
/// Return a new `Clock` instance that uses [`Instant::now`] as the source
|
||||
/// of time.
|
||||
///
|
||||
/// [`Instant::now`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.now
|
||||
pub fn system() -> Clock {
|
||||
Clock {
|
||||
now: None,
|
||||
|
||||
Reference in New Issue
Block a user