mirror of
https://github.com/gnustep/libs-performance.git
synced 2025-02-14 23:51:19 +00:00
Make sure tick is current before calling -newSecond:
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/performance/trunk@25207 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c414177897
commit
ca1fee320f
2 changed files with 14 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
|||
2007-05-30 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* GSTicker.m: Ensure tick is current before calling -newSecond:
|
||||
|
||||
2007-04-01 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* GSCache.m:
|
||||
|
|
14
GSTicker.m
14
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
|
||||
|
|
Loading…
Reference in a new issue