title: Building a realtime clock in iOS update with NSTimer or performSelector?
body: <p>I want to display the real time in a label and I found two approaches to update <code>NSDate</code>:</p>
  
  <p>The <code>performSelector</code> approach:</p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
  
      [self updateTime];
  }
  
  - (void)updateTime
  {
      NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
      [dateFormat setDateFormat:@"hh:mm:ss"];
      label.text = [dateFormat stringFromDate:[NSDate date]];
  
      //call updateTime again after 1 second
      [self performSelector:@selector(updateTime) withObject:self afterDelay:1.0];
  }
  </code></pre>
  
  <p>The <code>NSTimer</code> approach:</p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
  
      Timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(updateTime) userInfo:nil repeats:YES];
  }    
  
  - (void)updateTime 
  {
      NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
      [dateFormat setDateFormat:@"hh:mm:ss"];
      label.text = [dateFormat stringFromDate:[NSDate date]];
  }
  </code></pre>
  
  <p>Which one is the better, more performant and reliable method?</p>