CSCI P545  Embedded & Real-Time Computing Mon Oct 19 09:01:35 EDT 2009 [SDJ]

Timers and time measurement

The program below illustrates four ways to implement timed tasks in C:
  1. a signal handler for a timeout interrupts
  2. a thread that waits for a programmed time interval
  3. a POSIX timer object
  4. a sleeper process
The graphs that follow plot the jitter or variation in actual event handling.

Issues to consider:

[HTM] Source code timer_proto/main.c
Measured performance:
[PDF] signal handler.
[PDF] POSIX timer.
[PDF] select thread.
[PDF] nanosleep thread.
[PDF] Combined results