Skip to content

Instantly share code, notes, and snippets.

View tailang's full-sized avatar
💭
I'm busy

tailang tailang

💭
I'm busy
View GitHub Profile
@tailang
tailang / TimerWithGCD.md
Created July 12, 2016 07:17
Creating a timer with Grand Central Dispatch

##Creating a timer with Grand Central Dispatch

At the following is the implementation file of a sample class that shows, how to make a timer with the help of Grand Central Dispatch. The timer fires on a global queue, just change the queue to the main queue or any custom queue and the timer fires on this queue and not on the global queue anymore.

#import <Foundation/Foundation.h>

@interface SampleClass : NSObject
- (void)startTimer;