Skip to content
  • Matthew Draper's avatar
    c285f363
    Never report negative idle time · c285f363
    Matthew Draper authored
    We calculate idle time by subtracting two separately-obtained values,
    and apparently it's possible for the CPU-time clock to tick a
    millisecond ahead of the monotonic clock.
    
    I think it's safe to ignore that potential difference in general, but
    even at the extreme of CPU activity, I'm reasonably confident time
    doesn't move backwards.
    c285f363
    Never report negative idle time
    Matthew Draper authored
    We calculate idle time by subtracting two separately-obtained values,
    and apparently it's possible for the CPU-time clock to tick a
    millisecond ahead of the monotonic clock.
    
    I think it's safe to ignore that potential difference in general, but
    even at the extreme of CPU activity, I'm reasonably confident time
    doesn't move backwards.
Loading