Ver Fonte

Merge pull request #50 from Marqin/PR-fix-clang-1

fix Clang build
Marko Pintera há 9 anos atrás
pai
commit
0b961d2838

+ 1 - 1
Source/BansheeUtility/Include/BsTimer.h

@@ -39,7 +39,7 @@ namespace BansheeEngine
 
 	private:
 		std::chrono::high_resolution_clock mHRClock;
-		std::chrono::steady_clock::time_point mStartTime;
+		std::chrono::time_point<std::chrono::high_resolution_clock> mStartTime;
     };
 
 	/** @} */

+ 3 - 3
Source/BansheeUtility/Source/BsTimer.cpp

@@ -21,7 +21,7 @@ namespace BansheeEngine
 
 	UINT64 Timer::getMilliseconds() const
 	{
-		steady_clock::time_point newTime = mHRClock.now();
+		auto newTime = mHRClock.now();
 		nanoseconds newTimeNs = newTime.time_since_epoch();
 
 		return duration_cast<milliseconds>(newTimeNs).count();
@@ -29,7 +29,7 @@ namespace BansheeEngine
 
 	UINT64 Timer::getMicroseconds() const
 	{
-		steady_clock::time_point newTime = mHRClock.now();
+		auto newTime = mHRClock.now();
 		nanoseconds newTimeNs = newTime.time_since_epoch();
 
 		return duration_cast<microseconds>(newTimeNs).count();
@@ -41,4 +41,4 @@ namespace BansheeEngine
 
 		return duration_cast<milliseconds>(startTimeNs).count();
 	}
-}
+}