设置计时器?

时间:2011-07-03 17:52:48

标签: iphone objective-c cocoa-touch timer

  

可能重复:
  How do I use NSTimer

我是一个更新鲜的目标c。我与计时器混淆..

我有三个功能叫做“睡眠”,“唤醒”和“停止” ..我需要设置一个定时器,用于在执行“睡眠”功能后2分钟内调用“停止”功能

如果在调用“停止”功能后2分钟内/在定时器设置为2分钟后调用“唤醒”功能,还有一个条件需要使定时器到期。

任何人都可以告诉我该怎么办

Sleep{
//need to set a timer with time interval  2 minutes to call "Stop" function

}

Wake{

//need to  expire the timer, if the "Wake" function is called within 2 minutes 
}

Stop{
}

0 个答案:

没有答案
相关问题