whrt: made asserts a tad bit more numerically robust, for what it's worth.
Erik had reported that the PMT counter indicates a resolution > 2ms; i cannot see a legitimate reason for this happening :S (compiler bug? debugger bug? bad memory?) This was SVN commit r5301.
This commit is contained in:
parent
84e4e5aa12
commit
bdd1d93c8f
@ -97,7 +97,7 @@ static LibError win_get_gfx_drv_ver()
|
||||
// gfx_card which one is correct; we thus avoid driver-specific
|
||||
// name checks and reporting incorrectly.
|
||||
|
||||
LibError ret = ERR::FAIL; // single point of exit (for RegCloseKey)
|
||||
LibError ret = ERR::FAIL; // single point of exit (for RegCloseKey)
|
||||
DWORD i;
|
||||
char drv_name[MAX_PATH+1];
|
||||
|
||||
|
@ -100,8 +100,8 @@ static void InitCounter()
|
||||
counterMask = bit_mask64(counterBits);
|
||||
|
||||
// sanity checks
|
||||
debug_assert(nominalFrequency >= 500.0);
|
||||
debug_assert(resolution <= 2e-3);
|
||||
debug_assert(nominalFrequency >= 500.0-DBL_EPSILON);
|
||||
debug_assert(resolution <= 2e-3+DBL_EPSILON);
|
||||
debug_assert(8 <= counterBits && counterBits <= 64);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user