From 6cfc2917f09343a282fa1a6007a35cc4bc0edaa0 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Fri, 13 Aug 2010 13:28:38 +0200 Subject: [PATCH] extra debugging --- src/simulator/time.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/simulator/time.cc b/src/simulator/time.cc index a74de3be6..d8502c0f6 100644 --- a/src/simulator/time.cc +++ b/src/simulator/time.cc @@ -26,11 +26,14 @@ #include "ns3/string.h" #include "ns3/object.h" #include "ns3/config.h" +#include "ns3/log.h" #include #include namespace ns3 { +NS_LOG_COMPONENT_DEFINE("Time"); + Time::Time (const std::string& s) { std::string::size_type n = s.find_first_not_of ("0123456789."); @@ -97,6 +100,7 @@ Time::SetResolution (enum Unit resolution) void Time::SetResolution (enum Unit unit, struct Resolution *resolution) { + NS_LOG_FUNCTION (unit << resolution); int8_t power [LAST] = {15, 12, 9, 6, 3, 0}; for (int i = 0; i < Time::LAST; i++) { @@ -126,6 +130,10 @@ Time::SetResolution (enum Unit unit, struct Resolution *resolution) info->toMul = true; info->fromMul = false; } + NS_LOG_DEBUG ("i=" << i << + " shift=" << shift << + " from=" << info->timeFrom << + " to=" << info->timeTo); } resolution->unit = unit; }