Bugzilla – Full Text Bug Listing |
Summary: | Time class a full-blown arithmetic object | ||
---|---|---|---|
Product: | ns-3 | Reporter: | Mathieu Lacage <mathieu.lacage> |
Component: | core | Assignee: | ns-bugs <ns-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | Keywords: | api |
Priority: | P1 | ||
Version: | pre-release | ||
Hardware: | PC | ||
OS: | Linux |
Description
Mathieu Lacage
2006-10-20 07:36:39 UTC
I would like to add one extra comments: It might be really needed to go down that route because the current way of allowing the user to convert to various time units is sort of broken. Part of the deal when I designed the current Time getters was that the user would see no change in simulation behavior if we increased the internal accuracy of the event scheduler. However; this does not work in practice: if the code was designed to say: I want to schedule an event in 2 microseconds and if he used Schedule (Now + 2) to do this, his code might not be notified in 2 microseconds but in 1+epsilon microseconds due to the way time conversions are done. So, I think that the current way of working is bad in certain cases (which ought not to exist I should point out) So, I guess that the priority of this item has just increased in my work queue. The Time class now behaves like a full C++ POD. i.e., arithmetic operators are implemented, including +-*/. |