You probably know http://steem.arcange.eu/schedule/, where a witness can see the virtual_sheduled_time difference, but what is this difference in hours, minutes and seconds?
The following calculations are only correct for witnesses with a rank below 21!
In order to calculate this, we need the total vote count, the number of top witnesses and the VIRTUAL_SCHEDULE_LAP_LENGTH2.
VIRTUAL_SCHEDULE_LAP_LENGTH2 is a constant and is 340282366920938463463374607431768211455.
When summing up all votes (I estimated the sum by calculating the witnesses with the most votes) we have the vote_sum which is currently (considering the first 400 witnesses)
2692955397423812592. Currently we have 21 top witnesses.
The conversion from virtual_shedule_time to block_numbers is then 1.661915774761242e-19.
If we take then the virtual_scheduled_time of a witness and subtracting it from the current_virtual_time, we receive the number of blocks which have to pass until a new block is produced by the witness:
As a new block time is 3 seconds, we can calculate the time difference until a new block is produced.
The calculation result has an error when the active rank and the total rank of a witness is not equal. In this case, disabled witnesses are skipped which reduces the time until a new block is produced.
I found out about this by reading the steem source code:
If you like what I'm doing, please consider as one of your witnesses (steemconnect).