1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! The one time source this crate reads.
//!
//! Core never calls the system clock. Every instant it stamps, and every
//! comparison it makes against one — a bounded intervention's expiry, the
//! agent's minimum interval — is read through a [`Clock`], so that expiry is
//! driven by time passing and by nothing else and a test drives it by
//! advancing this one dependency alone.
use Timestamp;
/// The instant core reads the current time from.
///
/// Shareable across threads, because the expiry driver reads it from a thread
/// of its own while callers read it from theirs.
/// The system's own clock, which is what a running supervisor is given.
;
/// The instant `seconds` after `instant`.
///
/// Sub-second precision is kept: a bounded change asked to stand for a minute
/// stands for a minute, rather than for a minute less however far into a second
/// it happened to be made.
///
/// # Errors
///
/// Returns the timestamp crate's own error when the sum denotes no
/// representable instant.
/// How many whole seconds `later` is after `earlier`, saturating.
/// One instant as whole seconds after the Unix epoch.