Time is not rounded when created from an int64x64_t
This has been found while working on #264 (closed).
Basically, if you create a Time form an int64x64_t
, the value is truncated and not rounded. E.g.:
int64x64_t foo = 2.99;
Time bar = Time (foo);
std::cout << foo << " Vs " << bar << std::endl;
returns:
+2.99000000000000021316 Vs +2ns
@pdbj solution (much simpler and elegant than mine) is to change inline Time (const int64x64_t & v)
to:
explicit inline Time (const int64x64_t & v)
: m_data ( (v + 0.5).GetHigh ())
{ ... }
This solves the problem. However, two tests fails:
List of FAILed tests:
routing-aodv-regression
List of CRASHed tests:
lte-test-deactivate-bearer
The second test involves LteUeMac
, and must be closely checked.