Skip to content

Instantly share code, notes, and snippets.

@Tea-Ayataka
Created September 15, 2018 05:22
Show Gist options
  • Save Tea-Ayataka/ffbeabb739f1d52a301062a1b5c2410c to your computer and use it in GitHub Desktop.
Save Tea-Ayataka/ffbeabb739f1d52a301062a1b5c2410c to your computer and use it in GitHub Desktop.
Kotlin TimeUnits
fun Int.seconds() = this.toLong() * 1000
fun Int.minutes() = this.toLong() * 1000 * 60
fun Int.hours() = this.toLong() * 1000 * 60 * 60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment