summaryrefslogtreecommitdiff
path: root/zen/perf.h
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2021-03-03 01:18:05 +0000
committerB Stack <bgstack15@gmail.com>2021-03-03 01:18:05 +0000
commit320f1ae680d73da35a0cfe4846eb687d8616bcac (patch)
tree6fb17404841b30822a2d9204e3e0932e55f05ebb /zen/perf.h
parentMerge branch '11.6' into 'master' (diff)
parentadd upstream 11.7 (diff)
downloadFreeFileSync-320f1ae680d73da35a0cfe4846eb687d8616bcac.tar.gz
FreeFileSync-320f1ae680d73da35a0cfe4846eb687d8616bcac.tar.bz2
FreeFileSync-320f1ae680d73da35a0cfe4846eb687d8616bcac.zip
Merge branch '11.7' into 'master'11.7
add upstream 11.7 See merge request opensource-tracking/FreeFileSync!31
Diffstat (limited to 'zen/perf.h')
-rw-r--r--zen/perf.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/zen/perf.h b/zen/perf.h
index 6bc328bb..2ebf1955 100644
--- a/zen/perf.h
+++ b/zen/perf.h
@@ -23,21 +23,20 @@
static zen::PerfTimer perfTest(true); //startPaused
perfTest.resume();
- ZEN_ON_SCOPE_EXIT(perfTest.pause());
-*/
+ ZEN_ON_SCOPE_EXIT(perfTest.pause()); */
namespace zen
{
-//issue with wxStopWatch? https://freefilesync.org/forum/viewtopic.php?t=1426
-// => wxStopWatch implementation uses QueryPerformanceCounter: https://github.com/wxWidgets/wxWidgets/blob/17d72a48ffd4d8ff42eed070ac48ee2de50ceabd/src/common/stopwatch.cpp
-// => whatever the problem was, it's almost certainly not caused by QueryPerformanceCounter():
-// MSDN: "How often does QPC roll over? Not less than 100 years from the most recent system boot"
-// https://docs.microsoft.com/en-us/windows/win32/sysinfo/acquiring-high-resolution-time-stamps#general-faq-about-qpc-and-tsc
-//
-// => using the system clock is problematic: https://freefilesync.org/forum/viewtopic.php?t=5280
-//
-// std::chrono::system_clock wraps ::GetSystemTimePreciseAsFileTime()
-// std::chrono::steady_clock wraps ::QueryPerformanceCounter()
+/* issue with wxStopWatch? https://freefilesync.org/forum/viewtopic.php?t=1426
+ - wxStopWatch implementation uses QueryPerformanceCounter: https://github.com/wxWidgets/wxWidgets/blob/17d72a48ffd4d8ff42eed070ac48ee2de50ceabd/src/common/stopwatch.cpp
+ - whatever the problem was, it's almost certainly not caused by QueryPerformanceCounter():
+ MSDN: "How often does QPC roll over? Not less than 100 years from the most recent system boot"
+ https://docs.microsoft.com/en-us/windows/win32/sysinfo/acquiring-high-resolution-time-stamps#general-faq-about-qpc-and-tsc
+
+ - using the system clock is problematic: https://freefilesync.org/forum/viewtopic.php?t=5280
+
+ std::chrono::system_clock wraps ::GetSystemTimePreciseAsFileTime()
+ std::chrono::steady_clock wraps ::QueryPerformanceCounter() */
class StopWatch
{
public:
bgstack15