measure_block_time
Documentation for eth_defi.event_reader.block_time.measure_block_time function.
- measure_block_time(web3, n=5, padding=6)[source]
Measure block time over N blocks.
- Parameters
n – Number of blocks to sample
padding – How many blocks to ignore before the current block to ensure we do not try to measure unstable chain tip.
web3 (web3.main.Web3) –
- Returns
Block time in seconds
- Return type