IBM Rational Rose @RT is a tool for Model-driven design. The models can be described in several kinds of diagrams, for exapmle, class view, logical view and component view.
In RoseRT, there are two kinds of timers. One is periodic timer while the other is one-shot timer. Here we pay attention to the one-shot timer.
One-shot timer can be used like this way(for example we want to get the current time):
RTTimespec t;
RTTimespec::getclock(t);
Then t is assigned with the current time of the system. The problem is whether this time is current time which we want. If not, how much is the deciation?
It is obvious that the answer is NO. The time we get is NOT equal to the current time. There are three reasons.
1. The overhead of the function call.
2. The operating system cannot provider a precise time in nanosec.
3. Jitter produced by operating system (Jitter is always above 0).
The reason 1 cannot be avoided and the other two reasons depend on the operating system. If the operating system is not a real time operating system, it will produce a jitter. For example, I use NT40T(Windows XP SP3) on Core2 DUO E8300 @ 2.83GHz, the time I get equals (the current time + 0.00000030). One more interesting thing is that if the system is under high load, the jitter will increase a little.
PS: Here I measure the jitter by benchmark 1000 times and use the average to explain.
@Eindhoven, Nederland