Skip to content
  • Gilles Chanteperdrix's avatar
    cobalt/timer: avoid periodic timer drift · c20fceb1
    Gilles Chanteperdrix authored and Philippe Gerum's avatar Philippe Gerum committed
    Because timer period is converted to clock ticks when starting a
    periodic timer, round-off errors may accumulate at each timer tick
    causing the timer to drift. Fix this by keeping the timer period as a
    count of nanoseconds and convert to clock ticks at each period. This
    adds some overhead, but is more correct.
    c20fceb1