timeIntervalSinceDate ????
timeIntervalSinceDate ????
- Subject: timeIntervalSinceDate ????
- From: KyooHo Lee <email@hidden>
- Date: Thu, 27 Sep 2001 10:10:47 +0900
Hi.... all cocoa guys..
I was trying to build StopWatch app.
But I have terrible jam here...
This is my code.. somebody help me??
@implementation StopWatch
NSDate *oldDate;
NSDate *currentDate;
NSDate *intervalDate;
- (IBAction)start:(id)sender {
oldDate = [NSCalendarDate calendarDate];
[sender setTitle : @"stop"];
[sender setAction : @selector(stop:)];
[startField setObjectValue : oldDate];
}
- (IBAction)stop:(id)sender {
currentDate = [NSCalendarDate calendarDate];
[sender setTitle : @"start"];
[sender setAction : @selector(start:)];
[stopField setObjectValue : currentDate];
/* intervalDate = [currentDate timeIntervalSinceDate:oldDate];
[secondsField setObjectValue : intervalDate]; */ <= this code???
}
@end
I have no idea about how I could use "timeIntervalSinceDate"
please help me ???