From aa8eba9d994bab5d3972b25e52d64b378d1f8943 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 12 May 2010 12:00:18 +0200 Subject: [PATCH] Fixed: #889 NLMISC ticksToSecond error on Mac OS X (patch provided by rti) --- code/nel/src/misc/time_nl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/nel/src/misc/time_nl.cpp b/code/nel/src/misc/time_nl.cpp index ea4c65b0f..0cfe85f32 100644 --- a/code/nel/src/misc/time_nl.cpp +++ b/code/nel/src/misc/time_nl.cpp @@ -226,9 +226,10 @@ double CTime::ticksToSecond (TTicks ticks) if (factor == 0.0) { mach_timebase_info_data_t tbInfo; + mach_timebase_info(&tbInfo); factor = 1000000000.0 * (double)tbInfo.numer / (double)tbInfo.denom; } - return double(ticks * factor); + return double(ticks / factor); } #endif // NL_OS_WINDOWS {