mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Add unscheduled NSTimer block initializer.
This commit is contained in:
parent
ebfd7a2bea
commit
172e75b865
3 changed files with 19 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2021-03-03 Frederik Seiffert <frederik@algoriddim.com>
|
||||
|
||||
* Headers/Foundation/NSTimer.h:
|
||||
* Source/NSTimer.m: add unscheduled NSTimer block initializer
|
||||
|
||||
2021-02-22 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/Additions/GSXML.m:
|
||||
|
|
|
@ -93,6 +93,10 @@ GS_EXPORT_CLASS
|
|||
userInfo: (id)info
|
||||
repeats: (BOOL)f;
|
||||
|
||||
+ (NSTimer*) timerWithTimeInterval: (NSTimeInterval)ti
|
||||
repeats: (BOOL)f
|
||||
block: (GSTimerBlock)block;
|
||||
|
||||
- (void) fire;
|
||||
- (NSDate*) fireDate;
|
||||
- (void) invalidate;
|
||||
|
|
|
@ -197,6 +197,16 @@ static Class NSDate_class;
|
|||
repeats: f]);
|
||||
}
|
||||
|
||||
+ (NSTimer*) timerWithTimeInterval: (NSTimeInterval)ti
|
||||
repeats: (BOOL)f
|
||||
block: (GSTimerBlock)block
|
||||
{
|
||||
return AUTORELEASE([[self alloc] initWithFireDate: nil
|
||||
interval: ti
|
||||
repeats: f
|
||||
block: block]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a timer which will fire after ti seconds and, if f is YES,
|
||||
* every ti seconds thereafter. On firing, invocation will be performed.<br />
|
||||
|
|
Loading…
Reference in a new issue