Skip to main content
2 of 2
Incorporate the link from the comment
Murch
  • 77.8k
  • 35
  • 190
  • 641

stickies-v pointed out in a comment that the code calculating the progress increase per hour is in ModalOverlay::tipUpdate().

Basically, it does as would be expected to find the percent change of a quantity:

  1. Milliseconds elapsed between first and sample blocks:
    Δt = t_FirstBlock - t_SampleBlock

  2. How many milliseconds faster the sample block processed than the first block:
    Δprogress = t_FirstBlockProcess - t_SampleBlockProcess

  3. Gives:
    (% progress per hour) = Δprogress / (Δt × 1000 × 3600),

where (1000 × 3600) = milliseconds in 1 hour.

Actually, Δt and Δprogress are both negative numbers, but their ratio in step 3 above is positive.

Geremia
  • 4.7k
  • 7
  • 39
  • 81