getBlockTime RPC Method
Returns the estimated production time of a block.
Info
Each validator reports their UTC time to the ledger on a regular interval by intermittently adding a timestamp to a Vote for a particular block. A requested block's time is calculated from the stake-weighted mean of the Vote timestamps in a set of recent blocks recorded on the ledger.
Parameters
u64
required
block number, identified by Slot
Result
<i64>
- estimated production time, as Unix timestamp (seconds since the Unix epoch)
Code sample
Response
When a block time is available:
When a block time is not available: