2

How is “progress per hour” calculated?

progress per hour

What would be the shell script code to return this result?

0

1 Answer 1

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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