certi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [certi-dev] Speed of attributes updates beetwen two federates with t


From: Gotthard, Petr
Subject: RE: [certi-dev] Speed of attributes updates beetwen two federates with time managenment enabled / tick2
Date: Sun, 12 Apr 2009 11:06:32 +0200

> Petr is right, the zero parameter tick() is sort of active polling
> which may be a performance killer, you either should go for the two
> parameters tick in order to limit the "ticking rate" or use the
> CERTI specific tick2() function.
> tick2() is equivalent to tick(INF,INF)

One small corrigendum: the tick2() is equivalent to tick(INF,0).

The difference is only when two callbacks occur at the same time. The
tick(INF,INF) will execute both callbacks in a single tick, while the
tick(INF,0) will terminate after the first callback is processed. The
"while(1) tick(INF,INF)" loop is thus slightly more efficient than the
"while (1) tick(INF,0)" loop.


Petr





reply via email to

[Prev in Thread] Current Thread [Next in Thread]