Android アプリを iPhone に移植しようとしています。Android では、timer クラスと timerTasks を使用して、scheduleAtFixedRate: timer.scheduleAtFixedRate(task,15000, epochLengthMs);を使用して、60 秒ごとにデータを簡単に処理できます。
ありがとうございました!
iPhoneで使用できる同様のものはありますか?
protected void startTimer(){
if(timerStarted){
//avoid duplicate timers!
}else{
running = true;
timerStarted = true;
if(D)Log.w(TAG,"*Timer Started*");
timer = new Timer();
readyToProcess = true;
EpochCounterTask task = new EpochCounterTask();
AutoSaveTask saveTask = new AutoSaveTask();
//give statMagnitude enough time to get values
//after 15 sec, every 60 sec
timer.scheduleAtFixedRate(task,15000, epochLengthMs);
timer.scheduleAtFixedRate(saveTask,645000, 600000);
}
}