[Ns-developers] Internal Time Keeping Question

Hagen Paul Pfeifer hagen at jauu.net
Mon Jul 21 13:39:51 PDT 2008


* Mathieu Lacage | 2008-07-21 09:45:48 [-0700]:

>The HighPrecision/Time API is used to help users make time calculations,
>not to keep track of the simulation time. The simulation time is a 64
>bit counter while the HighPrecision time is a counter with a higher
>precision (to allow you to do multiplications, divisions, etc.)
>
>So, it all depends what you want to exchange. If you want to exchange
>user time across machines, you should use the value stored internally in
>the HighPrecision class (which means that you need access to all fields
>m_slowValue, m_fastValue, and m_isFast). If you want to exchange the
>simulation time, then, don't bother with all this: just exchange the
>internal 64 bit counter you get from Time.GetHighPrecision ().GetInteger
>().
>
>I suspect very much that you are in the latter case.

Right, the later one! It was not clear to that the fractional part was for
arithmethic only. Thank Mathieu!

Hagen




More information about the Ns-developers mailing list