Skip to content

Make Time public #2497

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lightning/src/util/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pub mod message_signing;
pub mod invoice;
pub mod persist;
pub mod string;
pub mod time;
pub mod wakers;

pub(crate) mod atomic_counter;
Expand All @@ -35,7 +36,6 @@ pub(crate) mod poly1305;
pub(crate) mod chacha20poly1305rfc;
pub(crate) mod transaction_utils;
pub(crate) mod scid_utils;
pub(crate) mod time;

pub mod indexed_map;

Expand Down
1 change: 1 addition & 0 deletions lightning/src/util/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ impl Sub<Duration> for Eternity {

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[cfg(not(feature = "no-std"))]
/// Tracts time monotonically, but may go backwards in time if the system clock is adjusted.
pub struct MonotonicTime(std::time::Instant);

/// The amount of time to shift `Instant` forward to prevent overflow when subtracting a `Duration`
Expand Down