RE: [GD-Windows] More timer fun!
Brought to you by:
vexxed72
From: brian h. <bri...@py...> - 2002-08-30 05:19:10
|
> I guess it's possible that sign extension from a 64-bit integer back > down to a 32-bit integer could cause the problem, but I've looked over > my code and basically it's all in 64-bit integers, with no funny > casting or anything like that once timeGetTime() returns. Bzzzzt, there WAS one tiny, itty bitty bit of funny casting after all =) So while the Dell stuff operates "unexpectedly", it basically just manifested a bug in my code: int delta = ( int ) ( timeGetTime() - last_time ); //Do some stuff that assumes that "delta" is always > 0 Everything is fine, until timeGetTime() - last_time becomes some very large number because, say, last_time is set to 0 (*cough*), at which point everything explodes because delta is < 0 and that's not something my code expected to ever see. Learn something new every day =) Brian |