Search code examples
c++ns2

What does Scheduler::instance().clock() return?


In which unit of time is the return value of Scheduler::instance().clock() in ns2? I assume, it is in milliseconds, but I could not find it in the documentation. Also a short look at the source code didn't answer my question.


Solution

  • (I am in no sense an ns2 expert, and am happy to be corrected, but:) It looks to me as if (1) for most purposes you can treat all times in ns2 as in arbitrary units, so long as everything you do uses them consistently, but (2) it's generally considered best to think of them as seconds. See, e.g., http://www.isi.edu/nsnam/ns/doc/node122.html for an instance where a time is assumed to be in seconds.