CodeTheRobot

C++ Advanced · exercise 01

Real-time constraints

Run a fixed-step loop and count deadline misses instead of drifting.

C++ Advanced lesson 01

Guided steps

  1. 1.Advance the loop clock by exactly one period per tick, never by the measured duration.
  2. 2.Count a miss whenever the work exceeds the period.
  3. 3.Print the tick count and the number of misses.

Your code

Your code is saved in this browser after every run and restored next time.