Real-Time Functions

Real-time operations center around the BIOS time-of-day clock, which is nothing more than a counter that the system automatically increments 18.2 times per second, or every 55 milliseconds. This number is often called the clock tick interrupt rate because an interrupt routine performs the incrementing. In addition, each increment is usually called a clock tick.

The fg_waitfor() function delays a program's execution by the number of clock ticks specified as its parameter. Because fg_waitfor() uses clock ticks, the actual length of the delay is the same, regardless of the system's processor speed. A common use of fg_waitfor() is slowing down a scrolling or panning loop.

The fg_getclock() function provides an efficient way to measure time, especially differences in time. This function has no parameters and returns the number of clock ticks since Windows started.

<< Prev

Next >>

Fastgraph Home Page


copyright 2001 Ted Gruber Software, Inc.