I'm not iOS developer but started learning Swift.
I try to convert some logic from Android project to iOS.
I have the following method:
func addGroupItemSample(sample : WmGroupItemSample){ // some custom class
var seconds: NSTimeInterval = NSDate().timeIntervalSince1970
var cuttDate:Double = seconds*1000;
var sampleDate: UInt64 = sample.getStartDate(); // <-- problematic place
if(sampleDate > cuttDate){
// ....
}
}
From the method above you can see that sample.getStartDate() returns type UInt64.
I thought it's like long in Java: System.currentTimeMillis()
But current time in milliseconds defined as Double.
Is it a proper way to mix Double and UInt64 or do I need to represent all milliseconds as Double only?
Thanks,