Subject: Re: FW: SDL-News: Timers
From: Andreas Metzger (metzger#informatik.uni-kl.de)
Date: Tue Mar 02 2004 - 09:49:29 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi everyone,
just a little remark concerning the proposed solution to the dynamic
setting of a timer from Anthony.
When generating any real-time code (e.g. Real-Time Simulation or
Application in Telelogic Tau SDL Suite), the proposed solution might
introduce a timer creep, i.e. the durations between the timer events
will get bigger than the desired 1.0. This is caused by the fact that
when the NOW-expression is evaluated, time has already expired (and also
because the timer-event does not necessarily occur at the specified
point in time, most probably a little later).
A more "robust" solution that will produce more precise durations is to
not use the NOW-expression for resetting the timer but rather remember
the recent time-out value, as in the attached example.
Greetings
~ Andreas Metzger
- --
Dipl.-Inform. Andreas Metzger
Department of Computer Science, University of Kaiserslautern, Germany
Website: http://wwwagz.informatik.uni-kl.de/staff/metzger
PGP Key: http://wwwagz.informatik.uni-kl.de/staff/metzger/pgp.txt
- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFARFipFmNXCrLRxRsRAsYJAKCiW2R/b5UhQ6C50WOEGLX5kOGvRgCcC8ig
W1K+5mRYu38V8iV8AvOzql4=
=AVw1
-----END PGP SIGNATURE-----
This archive was generated by hypermail 2a23 : Thu May 09 2013 - 16:05:50 GMT