6 #include <dispatch/dispatch.h>
8 #include "dispatch_test.h"
12 test_start("Dispatch Source Timer, bit 63");
14 //uint64_t interval = 0xffffffffffffffffull;
15 uint64_t interval
= 0x8000000000000001ull
;
17 dispatch_queue_t mainq
= dispatch_get_main_queue();
20 struct timeval start_time
;
22 gettimeofday(&start_time
, NULL
);
25 ds
= dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER
, 0, 0, mainq
);
27 dispatch_source_set_event_handler(ds
, ^{
31 dispatch_source_set_timer(ds
, DISPATCH_TIME_NOW
, interval
, 0);
34 dispatch_after(dispatch_time(DISPATCH_TIME_NOW
, 1*NSEC_PER_SEC
),
35 dispatch_get_main_queue(), ^{