Implementing a clock

To implement a new clock, you derive a new clock type from TClock or TSyncableClock.

When you use TClock, you override the standard clock functions: Now, DelayUntil, and Clone. To support the Syncable Clock framework, you also implement GetClockSurrogate. By deriving a new time source that has the same timing as your clock, you can implement GetClockSurrogate by getting a clock surrogate for the time source.

You must also override the following private functions to support delays on the clock:

If you use TSyncableClock, you need to call the inherited functions in any functions that you override. You can layer additional functionality, but you cannot entirely replace the TSyncableClock functions.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker