Skip to content

Commit

Permalink
increase granularity to improve consistency (doubles CPU usage, but s…
Browse files Browse the repository at this point in the history
…till low)
  • Loading branch information
AlexFolland committed Jul 4, 2017
1 parent 25a89ab commit 843ff71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion turbo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using namespace std;
// declarations and definitions

double targetFPS = 50.0; // target frames per second; set to target application's input polling rate
double targetGranularity = 4.0; // target number of times to poll per frame at target frame rate
double targetGranularity = 8.0; // target number of times to poll timer per frame at target frame rate
double sleepLength = (1000000.0/(targetGranularity*targetFPS)); // rough time between timing loops

LARGE_INTEGER ticksPerSecond; // timer frequency, defined by QueryPerformanceFrequency()
Expand Down

0 comments on commit 843ff71

Please sign in to comment.