If I run TrueTime two times, I get different times for the same function.

0 Likes

Problem:

If I run TrueTime on my application, and look at one function, then compare the numbers, I notice that there is often a discrepancy  between the times reported.  Why is this?

Resolution:

There are three possible issues.

First of all, are you running using QUANTUM Technology?  This technology means that when your process is not on the CPU, we do not count that time as part of your run.  To be sure that your are running using quantum, watch the output window as you start your application (you will need to run the TrueTime standalone for this test.)  There will be an output debug string along the lines of "Loading mach5 driver from path" and after that, a message indicating success or failure.  If the driver fails to load (or loads in one case but not the other.), this would explain the temporal discrepancies.  To fix this on NT: Reinstall TrueTime, and be sure that you install and run on an admin account.  On 95 and NT, you may need to install more memory.  A good indication that you do not have enough RAM is in the error message that comes after the "loading" message. If the Error code is 1450, then we could not load the Driver because of insufficient resources.

The second issue is arbitrary thread execution.  On NT, whenever an interrupt needs to be serviced (which happens extremely frequently.), to make the OS faster, the interrupt is serviced in the address context currently running on the processor.  No thread or address context switches are performed.  The result of this is that some arbitrary amount of processor time is spent doing OS work.  There is nothing (short of hooking the whole system.) that can be done to remove this time from your run.

The last issue is the very nature of the instruction we use.  While this instruction is accurate, it is not serialized.  Because of the nature of the processor, it is possible that even if issues one and two are not relevant, that the times will be off by a few cycles.  In this case, the number is so small, that it can be safely ignored.

Old KB# 11984
Comment List
Anonymous
Related Discussions
Recommended