- embedded systems with their own custom high performance timers
- scripting systems that use their own timing mechanisms
- It must be thread safe
- It must be fast
- It must return a 64-bit, monotonically increasing value
- It must have at least microsecond accuracy
- It must be synchronized across processors
The final thing to watch out for is if you use accumulation zones. The accumulation APIs are just macros that wrap calls around Telemetry's default timer function, which means that they are incompatible with a user defined one. To get around this you'll need to write your own accumulation zone enter/leave/get start macros (just use the existing ones as templates), e.g.:
#define myGetAccumulationStart(cx) ((cx) ? myFastTime() : 0)
#define myEnterAccumulationZone(cx,z) { if (cx) (z) -= myFastTime(); }
#define myLeaveAccumulationZone(cx,z) { if (cx) (z) += myFastTime(); }
If you need any assistance with this feature, please don't hesitate to contact us!
No comments:
Post a Comment