Skip to content

Instantly share code, notes, and snippets.

View ivan0013's full-sized avatar

Iván Rodríguez Torres ivan0013

  • Imagames Gamification Services S.L.
  • Santiago de Compostela
  • X @Ivan_0013
View GitHub Profile
@Splagoon
Splagoon / time.kt
Created November 11, 2014 18:50
Time magics with Kotlin
import java.util.Date
import kotlin.concurrent.*
fun at(date: Date, func: () -> Unit) {
val waitTime = date.getTime() - Date().getTime()
thread {
Thread.sleep(waitTime)
func()
}
}