Skip to content

Commit d464349

Browse files
committed
Eliminate NSDate call that did not work on older MacOS.
1 parent 20512ba commit d464349

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tray/tray.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,7 @@ int tray_loop(int blocking) {
181181

182182
id until;
183183
if (blocking) {
184-
until = ((id(*)(id, SEL))objc_msgSend)((id)objc_getClass("NSDate"), sel_registerName("now"));
185-
until = ((id(*)(id, SEL, double))objc_msgSend)(until, sel_registerName("dateByAddingTimeInterval:"), (double)MAX_WAIT_SECONDS);
184+
until = ((id(*)(id, SEL, double))objc_msgSend)((id)objc_getClass("NSDate"), sel_registerName("dateWithTimeIntervalSinceNow:"), (double)MAX_WAIT_SECONDS);
186185
until = ((id(*)(id, SEL))objc_msgSend)(until, sel_registerName("autorelease"));
187186
} else {
188187
until = ((id(*)(id, SEL))objc_msgSend)((id)objc_getClass("NSDate"), sel_registerName("distantPast"));

0 commit comments

Comments
 (0)