mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2024-11-24 06:55:45 +01:00
Fix issues with stop watch on windows.
This commit is contained in:
parent
e3757fde74
commit
9360e80a56
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user