From 3c09d3b365782349bf2cf9d29759207f6bf8d1f9 Mon Sep 17 00:00:00 2001 From: "matthias.ringwald" Date: Thu, 23 Dec 2010 20:20:07 +0000 Subject: [PATCH] correct CFTimer creation --- src/run_loop_cocoa.m | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/run_loop_cocoa.m b/src/run_loop_cocoa.m index bcb69cf7c..1e9c6d117 100644 --- a/src/run_loop_cocoa.m +++ b/src/run_loop_cocoa.m @@ -101,11 +101,8 @@ int cocoa_remove_data_source(data_source_t *dataSource){ void cocoa_add_timer(timer_source_t * ts) { - - CFAbsoluteTime now = CFAbsoluteTimeGetCurrent(); CFTimeInterval fireDate = ((double)ts->timeout.tv_sec) + (((double)ts->timeout.tv_usec)/1000000.0); - - CFRunLoopTimerRef timerRef = CFRunLoopTimerCreate (kCFAllocatorDefault,now+fireDate,fireDate,0,0,theCFRunLoopTimerCallBack,(void*)ts); + CFRunLoopTimerRef timerRef = CFRunLoopTimerCreate (kCFAllocatorDefault,fireDate,0,0,0,theCFRunLoopTimerCallBack,(void*)ts); // hack: store CFRunLoopTimerRef in next pointer of linked_item ts->item.next = (void *)timerRef;