New answers tagged

1

Avoid storing data unnecessarily Your class stores the start time, stop time and frequency in member variables, however you only need to store the start time: class Timer { LARGE_INTEGER start_count; public: // Query performance counter at the start of a block of code void start() { QueryPerformanceCounter(&start_count); } //...


2

Welcome to codereview.se and thanks for sharing your code. Here is what I think about it. Please keep in mind, that this is my personal view on it. Do not use the Java Singelton pattern. The singelton pattern is just another name for a global variable, which we consider harmful and bad coding since the early days of programming. Also the pattern is not that ...


Top 50 recent answers are included