IBM Rational Rose @ RealTime Timer的一些用法以及误差(some usages and deviations)

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


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值