NSTimeInterval
is not an object (it's a typedef for some floating-point number type, but you could have known that if you had read its documentation). Hence when you are trying to interpret a pointer (which Objective-C objects are represented by) as a floating-point primitive, you'll get unexpected results. How about changing the type of the argument of MethodwithTime:
to NSNumber *
?
(Oh, and method names start with a lowercase letter and use camelCaps, so MethodwithName:
is not idiomatic, MethodWithName:
isn't good either, methodWithName:
is.)