GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — timeclock/TimeStamp.m at master · wruth/timeclock Expand file tree/ Copy pathTimeStamp.mMore file actions 44 lines (32 loc) · 717 Bytes / Copy pathTimeStamp.mFile metadata and controls44 lines (32 loc) · 717 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 // // TimeStamp.m // TimeClock // // Created by Ward Ruth on 2/14/09. // Copyright 2009 __MyCompanyName__. All rights reserved. // #import "TimeStamp.h" @implementation TimeStamp + (NSSet *)keyPathsForValuesAffectingDuration { return [NSSet setWithObjects:@"startTime", @"endTime", nil]; } - (void)awakeFromInsert { [super awakeFromInsert]; [self setStartTime: [NSDate date]]; NSLog( @"endTime = %@", [self endTime]); } @dynamic note; @dynamic endTime; @dynamic startTime; @dynamic task; - (NSTimeInterval)duration { if ([self endTime]) { return [[self endTime] timeIntervalSinceDate:[self startTime]]; } //return 0; return [[NSDate date] timeIntervalSinceDate:[self startTime]]; } @end |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |