Skip to content

Instantly share code, notes, and snippets.

@bouchtaoui-dev
Created January 12, 2016 13:53
Show Gist options
  • Save bouchtaoui-dev/b32e6f005a52d758be26 to your computer and use it in GitHub Desktop.
Save bouchtaoui-dev/b32e6f005a52d758be26 to your computer and use it in GitHub Desktop.
- (void) startTimer {
NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval: 0.1 target:self selector:@selector(fireMe) userInfo:nil repeats:YES];
}
- (void) fireMe {
NSLog(@"I'm fired!");
}
// By setting the repeats on YES, makes the timer execute every 0.1 sec which is 100 ms.
// By setting it to NO, will execute the timer just once.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment