getBlockTime method

Future<i64?> getBlockTime(
  1. u64 slot
)

Returns the estimated production time of a block.

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.

Implementation

Future<i64?> getBlockTime(
  final u64 slot,
) async =>
    (await getBlockTimeRaw(slot)).result;