Hi Jules,
There is a bug with the HiResCounterHandler on powerpc macs. On these, the mach_timebase_info returns
numerator=1000000000, denominator=33330633 * 1000000 . These values are very large, so in the code
(mach_absolute_time() * numerator) / denominator) for the millisecond counter, there is an overflow that occurs every 553 seconds ((655366553665536*65536) / (33330633 MHz * 1000000000)). Each time this overflow happens, the millisecondcounter jumps back in time and the juce demo app stops receiving timer callbacks.
(on intel macs , numerator=1 , denominator=1000000)
I suggest to use something like (push the overflow to 553000000 seconds in the future, which is quite far away I think)
if ((timebase.numer < 1000000000) {
numerator = timebase.numer;
denominator = timebase.denom * (int64) 1000000;
} else {
numerator = timebase.numer / 1000000;
denominator = timebase.denom;
}
or anything nicer that prevents the overflow
It’s fine for me of course