Tag: 计时器继续

如何在计时器结束时自动延续?

当计时器用完时,我想自动延续。 我在这里有一个计时器: class Timer{ var timer = NSTimer(); // the callback to be invoked everytime the timer 'ticks' var handler: (Int) -> (); //the total duration in seconds for which the timer should run to be set by the caller let duration: Int; //the amount of time in seconds elapsed so far var elapsedTime: Int […]