Add getBlockTime rpc api (#7130)
* Add getBlockTime rpc api * Add getBlockTime to docs * Fix duration rounding for common tick/slot durations; add slot duration calculation * Expose slots_per_year * Use genesis values instead of clock defaults to calculate block offset * Add get-block-time cli subcommand * Fix test_rent: decrease magic number usage
This commit is contained in:
@@ -85,6 +85,10 @@ pub type Segment = u64;
|
||||
/// some number of Slots.
|
||||
pub type Epoch = u64;
|
||||
|
||||
/// UnixTimestamp is an approximate measure of real-world time,
|
||||
/// expressed as Unix time (ie. seconds since the Unix epoch)
|
||||
pub type UnixTimestamp = i64;
|
||||
|
||||
/// Clock represents network time. Members of Clock start from 0 upon
|
||||
/// network boot. The best way to map Clock to wallclock time is to use
|
||||
/// current Slot, as Epochs vary in duration (they start short and grow
|
||||
|
Reference in New Issue
Block a user