diff --git a/ChangeLog b/ChangeLog index 249cb93..90a7535 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-05-30 Richard Frith-Macdonald + + * GSTicker.m: Ensure tick is current before calling -newSecond: + 2007-04-01 Richard Frith-Macdonald * GSCache.m: diff --git a/GSTicker.m b/GSTicker.m index 0317c7c..bc26a1e 100644 --- a/GSTicker.m +++ b/GSTicker.m @@ -297,16 +297,22 @@ NSTimeInterval GSTickerTimeNow() if (tt != nil && [tt->observers count] > 0) { NSTimeInterval ti; - NSArray *a = [tt->observers copy]; if (tt->theTimer != t) { [tt->theTimer invalidate]; tt->theTimer = nil; } - [a makeObjectsPerformSelector: @selector(fire:) - withObject: tt->observers]; - RELEASE(a); + + if ([tt->observers count] > 0) + { + NSArray *a = [tt->observers copy]; + + GSTickerTimeNow(); + [a makeObjectsPerformSelector: @selector(fire:) + withObject: tt->observers]; + RELEASE(a); + } ti = GSTickerTimeNow(); tt->theTimer = [NSTimer scheduledTimerWithTimeInterval: ti - (int)ti