The ns-3 Network Simulator Project

Find all conversions of Time to double

The Time class helps prevent unit conversion errors, by forcing users to be explicit about the units associated with their values. For this to work well easily Time supports many arithmetic operations directly. However, it's possible to get a Time as a double, and do arithmetic with doubles, finally converting back to Times. This is bad because it loses precision (Times are 64 bits, while doubles have only 53 bits of precision), as well as being error prone if the arithmetic involves quantities with implicit units.

Your task is to pick a module in ns-3 (any directory immediately under src) and document all cases where Times are converted to double, computed with, then converted back to Times. Select any module and complete your task by submitting the list you find, stating the file, line where the conversion to double happens, and the line where it's converted back to Time.

Task tags

  • doxygen
  • c++

Students who completed this task

Lã Tuấn Minh, SaiMyGuy, Long

Task type

  • code Code
  • chrome_reader_mode Documentation / Training

Level

Beginner
close

2019