I am trying to get the system time in milliseconds.
For that I have declared:
NSNumber *createdTimeInMilliSec; //in class declaration
and in one of my instance functions, I doing:
self.createdTimeInMilliSec= ([NSDate timeIntervalSinceReferenceDate]*1000); //ERROR: incompatible type for argument 1 of 'setCreatedTimeInMilliSec:'
timeIntervalSinceReferenceDate returns in NSTimeInterval, so how to convert that into NSNumber? Or what I am doing wrong?
NSTimeIntervalis typedefed as follow :typedef double NSTimeInterval;.To create a
NSNumberwith, use :