O'Reilly logo

Control Software for Mechanical Systems: Object-Oriented Design in a Real-Time World by J. R. Ridgely, J. D. Ringgenberg, D. M. Auslander

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7Timing Techniques On Pc Compatibles

There are two groups of algorithms described here for measuring time on a PC. One is a calibrated approach which measures the execution speed of the program and calibrates this speed with a real-time clock. The other uses the PC’s real-time clock to measure time changes, and keeps track of the overall time by summing these small time measurements. Interrupts are also used to help ensure that the range of the real-time clock is not exceeded.

7.1 Calibrated Time

At a fixed point in the execution of the program, a counter is incremented. This would most likely occur at the beginning or end of an execution scan. The total count is then multiplied by a calibration constant to yield time. This constant ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required