Last active
July 12, 2019 09:28
-
-
Save krzyzanowskim/2a42bfb225b69eb459bf561e386ea6b4 to your computer and use it in GitHub Desktop.
A NSTimeInterval value is always specified in https://twitter.com/krzyzanowskim/status/1149607371204784129
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://twitter.com/krzyzanowskim/status/1149607371204784129 | |
extension TimeInterval { | |
static func minutes(_ minutes: Int) -> TimeInterval { | |
return TimeInterval(seconds(60) * TimeInterval(minutes)) | |
} | |
static func seconds(_ seconds: Int) -> TimeInterval { | |
return TimeInterval(seconds) | |
} | |
static func miliseconds(_ miliseconds: Int) -> TimeInterval { | |
return 0.001 * TimeInterval(miliseconds) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@ibrahimkteish thanks! fixed