Skip to content

Instantly share code, notes, and snippets.

@MMercieca
Last active January 8, 2016 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MMercieca/2283cb53212810f538b2 to your computer and use it in GitHub Desktop.
Save MMercieca/2283cb53212810f538b2 to your computer and use it in GitHub Desktop.
Interval loop
for _ in 1...3 {
for _ in 1...5 {
intervals.append(Speed.Jog)
intervals.append(Speed.Run)
intervals.append(Speed.Sprint)
}
intervals.append(Speed.Break)
}
...
nextInterval = intervals.first!
timer = NSTimer(timeInterval: nextInterval, target: self, selector: "timerFired", userInfo: nil, repeats: false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment