Skip to main content

Module time

Module time 

Source
Expand description

Manages the block time

Re-exportsยง

use crate::eth::error::BlockchainError; ๐Ÿ”’
use chrono::DateTime; ๐Ÿ”’
use chrono::Utc; ๐Ÿ”’
use parking_lot::RwLock; ๐Ÿ”’
use std::sync::Arc; ๐Ÿ”’
use std::time::Duration; ๐Ÿ”’

Structsยง

PendingBlockTimestamp ๐Ÿ”’
A timestamp prepared for a candidate block but not yet committed.
PendingTimeIncrease ๐Ÿ”’
A temporary additive time increase that can be rolled back after failed manual mining.
TimeManager
Manages block time
TimeSnapshot ๐Ÿ”’
Time controls captured by an in-memory state snapshot.
TimeState ๐Ÿ”’
Timestamp controls that must be read and committed atomically.
TimestampOverride ๐Ÿ”’

Functionsยง

duration_since_unix_epoch
Returns the current duration since unix epoch.
utc_from_secs
Returns the Utc datetime for the given seconds since unix epoch