#import <Foundation/NSTimer.h>
#import <Foundation/NSRunLoop.h>

@interface TimerTest : NSObject
{
}

@end

@implementation TimerTest

- (void)startTimer
{
  [NSTimer scheduledTimerWithTimeInterval: 1.0
	   target: self selector: @selector(printHello:)
	   userInfo: nil repeats: YES];

  NSLog(@"before run");
  [[NSRunLoop currentRunLoop] run];
  NSLog(@"after run");
}

- (void)printHello: (NSTimer *)aTimer
{
  NSLog(@"Hello");
}

@end

int main()
{
  id t = [TimerTest new];
  [t startTimer];
}
