implement Scalar::GetDouble
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Fri, 03 Nov 2006 09:28:29 +0100
changeset 158 47af319de4b8
parent 157 19ffb62f521e
child 159 e2c8e211039e
implement Scalar::GetDouble
src/simulator/nstime.h
src/simulator/time.cc
--- a/src/simulator/nstime.h	Fri Nov 03 09:26:48 2006 +0100
+++ b/src/simulator/nstime.h	Fri Nov 03 09:28:29 2006 +0100
@@ -240,7 +240,7 @@
   Scalar ();
   Scalar (double scalar);
   Scalar (TimeUnit<0> scalar);
-  double Get (void) const;
+  double GetDouble (void) const;
 };
 
 typedef TimeUnit<-1> TimeInvert;
--- a/src/simulator/time.cc	Fri Nov 03 09:26:48 2006 +0100
+++ b/src/simulator/time.cc	Fri Nov 03 09:28:29 2006 +0100
@@ -98,6 +98,12 @@
   : TimeUnit<0> (HighPrecision (scalar))
 {}
 
+double
+Scalar::GetDouble (void) const
+{
+  return GetHighPrecision ().GetDouble ();
+}
+
 }; // namespace ns3