Question: I'm still new to Objective C syntax, so I might be overcomplicating this, but I can't seem to figure out how to pass an NSTimeInterval to a thread.

I want to initiate a thread that sleeps for x seconds parameter sent from main thread as follows: 

```
[NSThread detachNewThreadSelector:@selector(StartServerSynchThread) toTarget:self withObject:5];

- (void) StartServerSynchThread:(NSTimeInterval *)sleepSecondsInterval {

    [NSThread sleepForTimeInterval:sleepSecondsInterval];

}

```

But the compiler keeps giving me a syntax error. I'm not sure exactly how it should be done. Any help would be appreciated. Thanks!

Answer: 
This is almost exactly the same as @Georg's answer, but using the proper types. :)

If you box the NSTimeInterval into an `NSNumber` (a subclass of `NSValue`), you can pass that in instead:

```
[NSThread detachNewThreadSelector:@selector(startServerSynchThread:) 
                         toTarget:self 
                       withObject:[NSNumber numberWithDouble:myTimeInterval]];

- (void) startServerSynchThread:(NSNumber *)interval {
  [NSThread sleepForTimeInterval:[interval doubleValue]];
}

```
The `object` parameter has `id` type, which means only class-type objects can be passed. Integers, like the `5` you are trying to pass, as well as `NSTimeInterval` (actually just a `typedef` for `double`), are fundamental types, not class-types.

You can use `NSNumber` as a wrapper or pass a `NSDate` instead.