Skip to content

dispatch after misuse #2

@jonasman

Description

@jonasman
  dispatch_source_set_timer(timer,
                                dispatch_time(DISPATCH_TIME_NOW, 0), --------> Configure here the start time, put the interval with dispatch_time or dispatch_walltime
                              interval * NSEC_PER_SEC,
                              0);

   ....

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, interval * NSEC_PER_SEC), queue, ^{
        dispatch_resume(timer);
    }); -----> just resume normally now, no more dispathc_after

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions