From 3430444212a14a7f40d8b1afdbefc68c3319562d Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 24 Jul 2013 22:41:02 -0700 Subject: BUIDLFIX: forgot to extract value from units object for calling llformat --- indra/llcommon/lltimer.cpp | 11 +++++++++++ indra/llcommon/lltimer.h | 6 +++--- indra/newview/llappviewer.cpp | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp index 693809b622..25383fc4d8 100755 --- a/indra/llcommon/lltimer.cpp +++ b/indra/llcommon/lltimer.cpp @@ -281,7 +281,18 @@ LLTimer::LLTimer() } LLTimer::~LLTimer() +{} + +// static +void LLTimer::initClass() +{ + if (!sTimer) sTimer = new LLTimer; +} + +// static +void LLTimer::cleanupClass() { + delete sTimer; sTimer = NULL; } // static diff --git a/indra/llcommon/lltimer.h b/indra/llcommon/lltimer.h index 9e464c4b1a..9f1f243dbb 100755 --- a/indra/llcommon/lltimer.h +++ b/indra/llcommon/lltimer.h @@ -62,14 +62,14 @@ public: LLTimer(); ~LLTimer(); - static void initClass() { if (!sTimer) sTimer = new LLTimer; } - static void cleanupClass() { delete sTimer; sTimer = NULL; } + static void initClass(); + static void cleanupClass(); // Return a high precision number of seconds since the start of // this application instance. static LLUnitImplicit getElapsedSeconds() { - return sTimer->getElapsedTimeF64(); + return sTimer ? sTimer->getElapsedTimeF64() : 0.0; } // Return a high precision usec since epoch diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 8ad5784f40..9193037a6c 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -662,7 +662,7 @@ LLTextureFetch* LLAppViewer::sTextureFetch = NULL; std::string getRuntime() { - return llformat("%g", LLTimer::getElapsedSeconds()); + return llformat("%g", LLTimer::getElapsedSeconds().value()); } LLAppViewer::LLAppViewer() -- cgit v1.2.3