iPhoneアプリ開発: UNIX時間、エポックからのミリ秒の取得
+ (UInt64
)getEpochSeconds
{
return (UInt64
)floor(CFAbsoluteTimeGetCurrent
() + kCFAbsoluteTimeIntervalSince1970
);
}
+ (UInt64
)getEpochMilliSeconds
{
return (UInt64
)floor((CFAbsoluteTimeGetCurrent
() + kCFAbsoluteTimeIntervalSince1970
) * 1000.0);
}
ゲームの制限時間をきっちり処理するために、UNIXタイムを使いました。