Skip to content

Instantly share code, notes, and snippets.

@StanislavK
Created May 31, 2015 10:20
Show Gist options
  • Save StanislavK/3f074e6b3771e7b19132 to your computer and use it in GitHub Desktop.
Save StanislavK/3f074e6b3771e7b19132 to your computer and use it in GitHub Desktop.
extension Double {
var second: NSTimeInterval { return self }
var seconds: NSTimeInterval { return self }
var minute: NSTimeInterval { return self * 60 }
var minutes: NSTimeInterval { return self * 60 }
var hour: NSTimeInterval { return self * 3600 }
var hours: NSTimeInterval { return self * 3600 }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment