From a0a93e6f8d18ac06c2553104b4c72994f95a0f13 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Fri, 3 Nov 2006 09:28:29 +0100 Subject: [PATCH] implement Scalar::GetDouble --- src/simulator/nstime.h | 2 +- src/simulator/time.cc | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/simulator/nstime.h b/src/simulator/nstime.h index d897e9871..43a6b70b2 100644 --- a/src/simulator/nstime.h +++ b/src/simulator/nstime.h @@ -240,7 +240,7 @@ public: Scalar (); Scalar (double scalar); Scalar (TimeUnit<0> scalar); - double Get (void) const; + double GetDouble (void) const; }; typedef TimeUnit<-1> TimeInvert; diff --git a/src/simulator/time.cc b/src/simulator/time.cc index 7d0509633..894f73be7 100644 --- a/src/simulator/time.cc +++ b/src/simulator/time.cc @@ -98,6 +98,12 @@ Scalar::Scalar (double scalar) : TimeUnit<0> (HighPrecision (scalar)) {} +double +Scalar::GetDouble (void) const +{ + return GetHighPrecision ().GetDouble (); +} + }; // namespace ns3