Last active
February 11, 2017 15:58
-
-
Save rcharlton/57adaca3c4f6d2e971870e6dbcdc0464 to your computer and use it in GitHub Desktop.
TimeInterval Convenience Methods
This file contains 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
import Foundation | |
public func TimeInterval(seconds: Double) -> Foundation.TimeInterval { | |
return Foundation.TimeInterval(seconds) | |
} | |
public func TimeInterval(minutes: Double) -> Foundation.TimeInterval { | |
return Foundation.TimeInterval(minutes * 60.0) | |
} | |
public func TimeInterval(hours: Double) -> Foundation.TimeInterval { | |
return TimeInterval(minutes: hours * 60.0) | |
} | |
public func TimeInterval(days: Double) -> Foundation.TimeInterval { | |
return TimeInterval(hours: days * 24.0) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment