Changeset 348 for trunk/Cocoa/AntiRSI/AntiRSI.m
- Timestamp:
- 11/05/07 10:48:26 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cocoa/AntiRSI/AntiRSI.m
r346 r348 598 598 - (NSString *)sessionTimeString; 599 599 { 600 return [NSString stringWithFormat:@"Session: %d:%02d:%02d", (int)session_t / 3600, 601 ((int)session_t / 60) % 60, lrint(session_t) % 60]; 600 int seconds = lrint(session_t); 601 return [NSString stringWithFormat:@"Session: %d:%02d:%02d", seconds / 3600, 602 (seconds / 60) % 60, seconds % 60]; 602 603 } 603 604 … … 608 609 609 610 // time left 610 double timeLeft = duration - progress_t;611 [time setStringValue:[NSString stringWithFormat:@"%d:%02d", (int)timeLeft / 60, lrint(timeLeft)% 60]];611 int timeLeft = lrint(duration - progress_t); 612 [time setStringValue:[NSString stringWithFormat:@"%d:%02d", timeLeft / 60, timeLeft % 60]]; 612 613 613 614 // cumulative typing time in this session (e.g. today)
Note:
See TracChangeset
for help on using the changeset viewer.