1
/* Declarations for NSTimer for GNUStep
2
Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc.
4
Written by: Andrew Kachites McCallum <mccallum@gnu.ai.mit.edu>
7
This file is part of the GNUstep Base Library.
9
This library is free software; you can redistribute it and/or
10
modify it under the terms of the GNU Library General Public
11
License as published by the Free Software Foundation; either
12
version 2 of the License, or (at your option) any later version.
14
This library is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
Library General Public License for more details.
19
You should have received a copy of the GNU Library General Public
20
License along with this library; if not, write to the Free
21
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
24
#ifndef __NSTimer_include__
25
#define __NSTimer_include__
27
/* This class is currently thrown together. When it is cleaned up, it
28
may no longer be concrete. */
30
#include <Foundation/NSDate.h>
33
* NB. NSRunLoop is optimised using a hack that knows about the
34
* class layout for the fire date and invialidation flag in NSTimer.
35
* These MUST remain the first two items in the class.
37
@interface NSTimer : NSObject
39
NSDate *_date; /* Must be first - for NSRunLoop optimisation */
40
BOOL _invalidated; /* Must be 2nd - for NSRunLoop optimisation */
42
NSTimeInterval _interval;
48
/* Creating timer objects. */
50
+ (NSTimer*) scheduledTimerWithTimeInterval: (NSTimeInterval)ti
51
invocation: (NSInvocation*)invocation
53
+ (NSTimer*) scheduledTimerWithTimeInterval: (NSTimeInterval)ti
55
selector: (SEL)selector
59
+ (NSTimer*) timerWithTimeInterval: (NSTimeInterval)ti
60
invocation: (NSInvocation*)invocation
62
+ (NSTimer*) timerWithTimeInterval: (NSTimeInterval)ti
64
selector: (SEL)selector
74
#ifndef STRICT_OPENSTEP
75
- (id) initWithFireDate: (NSDate*)fd
76
interval: (NSTimeInterval)ti
78
selector: (SEL)selector
82
- (void) setFireDate: (NSDate*)fireDate;
83
- (NSTimeInterval) timeInterval;