Fix issues with stop watch on windows.

This commit is contained in:
Pavel Krajcevski 2012-11-07 15:21:02 -05:00
parent e3757fde74
commit 9360e80a56

View File

@ -19,12 +19,14 @@
#include "TexCompTypes.h"
#include <cassert>
#include <Windows.h>
class StopWatchImpl {
public:
uint64 frequency;
uint64 start;
uint64 stop;
uintptr affinityMask;
uintptr_t affinityMask;
StopWatchImpl() :
start(0), stop(0), affinityMask(0)
@ -108,7 +110,7 @@ double StopWatch::TimeInSeconds() const
{
// Return the elapsed time in seconds.
assert((impl->stop - impl->start) > 0);
return double(impl->stop - impl->start) / double(frequency);
return double(impl->stop - impl->start) / double(impl->frequency);
}
// Get the elapsed time in milliseconds.
@ -116,7 +118,7 @@ double StopWatch::TimeInMilliseconds() const
{
// Return the elapsed time in milliseconds.
assert((impl->stop - impl->start) > 0);
return double(impl->stop - impl->start) / double(frequency) * 1000.0;
return double(impl->stop - impl->start) / double(impl->frequency) * 1000.0;
}
// Get the elapsed time in microseconds.