summaryrefslogtreecommitdiff
path: root/zen/perf.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:22:55 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:22:55 +0200
commitc4182431ac7d9d306fdd2267e082fa4cec6fec2c (patch)
tree865cca543c062b7af2586f85cee19f9af4e7614d /zen/perf.h
parent5.11 (diff)
downloadFreeFileSync-c4182431ac7d9d306fdd2267e082fa4cec6fec2c.tar.gz
FreeFileSync-c4182431ac7d9d306fdd2267e082fa4cec6fec2c.tar.bz2
FreeFileSync-c4182431ac7d9d306fdd2267e082fa4cec6fec2c.zip
5.12
Diffstat (limited to 'zen/perf.h')
-rw-r--r--zen/perf.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/zen/perf.h b/zen/perf.h
index 92350602..4a334bff 100644
--- a/zen/perf.h
+++ b/zen/perf.h
@@ -29,11 +29,13 @@ public:
class TimerError {};
ZEN_DEPRECATE
- PerfTimer() : ticksPerSec_(ticksPerSec()), startTime(), resultShown(false)
+ PerfTimer() : //throw TimerError
+ ticksPerSec_(ticksPerSec()), startTime(), resultShown(false)
{
//std::clock() - "counts CPU time in C and wall time in VC++" - WTF!???
#ifdef FFS_WIN
- if (::SetThreadAffinityMask(::GetCurrentThread(), 1) == 0) throw TimerError(); //"should not be required unless there are bugs in BIOS or HAL" - msdn, QueryPerformanceCounter
+ if (::SetThreadAffinityMask(::GetCurrentThread(), 1) == 0) //"should not be required unless there are bugs in BIOS or HAL" - msdn, QueryPerformanceCounter
+ throw TimerError();
#endif
startTime = getTicks();
if (ticksPerSec_ == 0 || !startTime.isValid())
bgstack15