Skip to content

dispatch after misuse #2

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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