1
1
forked from 0ad/0ad

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:
janwas 2007-08-25 16:38:36 +00:00
parent 84e4e5aa12
commit bdd1d93c8f
2 changed files with 3 additions and 3 deletions

View File

@ -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);
}