From bd14f87e73698a6b60cb21b388779063d8d3273f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Mon, 16 Jan 2012 09:58:56 +0000 Subject: [PATCH] Fixed warning by splitting out win32 specific stuff from timer.cc git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@498 fdac6126-5c0c-442c-9429-916003d36597 --- src/OpenMesh/Tools/Utils/Timer.cc | 4 +--- src/OpenMesh/Tools/Utils/TimerWin32.cc | 6 ++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/OpenMesh/Tools/Utils/Timer.cc b/src/OpenMesh/Tools/Utils/Timer.cc index a8a3c347..d1c215c6 100644 --- a/src/OpenMesh/Tools/Utils/Timer.cc +++ b/src/OpenMesh/Tools/Utils/Timer.cc @@ -195,9 +195,7 @@ void TimerImplStd::stop(void) Timer::Timer(void) { -#if defined(WIN32) && defined(_MSC_VER) - impl_ = new TimerImplWin32; -#elif defined(__GNUC__) && defined(__POSIX__) +#if defined(__GNUC__) && defined(__POSIX__) // CLOCK_REALTIME // CLOCK_MONOTONIC - ? // CLOCK_REALTIME_HR - RTlinux diff --git a/src/OpenMesh/Tools/Utils/TimerWin32.cc b/src/OpenMesh/Tools/Utils/TimerWin32.cc index 15f56b4e..ee3859ed 100644 --- a/src/OpenMesh/Tools/Utils/TimerWin32.cc +++ b/src/OpenMesh/Tools/Utils/TimerWin32.cc @@ -124,6 +124,12 @@ double TimerImplWin32::seconds(void) const return (double)count_.QuadPart/(double)freq_.QuadPart; } +Timer::Timer(void) +{ + impl_ = new TimerImplWin32; + state_ = Stopped; +} + #endif // ============================================================================