This question already has an answer here:

I've recently created a private ethereum blockchain and would like to time, personally, how long it will take to mine a block in the private blockchain I have created. I'm using the command line/geth JSON-RPC interface, so if there's a way to time how long it takes to mine a block from within the JSON-RPC CLI interface and put it in a file that would be very helpful.

marked as duplicate by Nicolas Massart, Vignesh Karthikeyan, Achala Dissanayake, Richard Horrocks, eth Jul 24 '18 at 6:59

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Is there a reason why you want to time the block generation time as opposed to calculate it? (As suggested above) – lungj Jul 19 '18 at 16:31

with the commandline:


where 83 and 82 are block numbers

with RPC just use eth_getBlockByNumber function

Not the answer you're looking for? Browse other questions tagged or ask your own question.