consolidate constants related to time for future refactoring (#14440)
This commit is contained in:
committed by
GitHub
parent
3fc7362486
commit
938d482135
@ -284,10 +284,7 @@ impl fmt::Display for CliEpochInfo {
|
||||
}
|
||||
|
||||
fn slot_to_human_time(slot: Slot) -> String {
|
||||
humantime::format_duration(Duration::from_secs(
|
||||
slot * clock::DEFAULT_TICKS_PER_SLOT / clock::DEFAULT_TICKS_PER_SECOND,
|
||||
))
|
||||
.to_string()
|
||||
humantime::format_duration(Duration::from_millis(slot * clock::DEFAULT_MS_PER_SLOT)).to_string()
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Default)]
|
||||
|
Reference in New Issue
Block a user