I am using private network with geth 1.7, and have some questions
1- To get the time of executing a function, i found some discussion about use of Data.getTime(), but i am wondering if anyone was successfully able to implement other methods such as performance.now() to measure time in geth commandlines? I tried but seems not defined function!!
2- how can i get the timestamp for a specific block if i knew the block number?
3- how can i mine only one block. For example, i send one transaction to the private network and then only mine one block containing that transaction. I found here some suggest to use while loop to check if there is no pending transactions and then stop mining. But i do not want this method, i would rather prefer to only mine one block.
Thanks in advance,