Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from web3 import Web3
- import time
- infura_url = "https://bsc-dataseed.binance.org/"
- w3 = Web3(Web3.HTTPProvider(infura_url))
- print(time.time())
- lastb = w3.eth.block_number
- lastt = time.time()
- while True:
- t = time.time()
- b=w3.eth.block_number
- if lastb == b-1:
- print(t-lastt)
- lastb = b
- lastt = t
Add Comment
Please, Sign In to add comment