*

iPhoneアプリ NSTimeIntervalについて

主にNSDateの比較として用いていた為、floatで扱うという感覚が無かった。

currentDateとpreviouseDateの割当は割愛。


// コレはダメ
NSLog(@"%d", [currentDate timeIntervalSinceDate:previouseDate]);

// コレはOK
NSLog(@"%.1f", [currentDate timeIntervalSinceDate:previouseDate]);
NSLog(@"%.0f", [currentDate timeIntervalSinceDate:previouseDate]);
NSLog(@"%d", (int)[currentDate timeIntervalSinceDate:previouseDate]);


つか、intとかfloatとか一々気にしなきゃいけないってめんどくせーな。。。