Replace references to NEU with Firmament

This commit is contained in:
nea
2023-05-16 01:23:43 +02:00
parent 96c546cc73
commit ead6762eb1
70 changed files with 354 additions and 360 deletions

View File

@@ -0,0 +1,23 @@
package moe.nea.firmament.util
import kotlin.time.Duration
import kotlin.time.ExperimentalTime
import kotlin.time.TimeSource
@OptIn(ExperimentalTime::class)
class Timer {
private var mark: TimeSource.Monotonic.ValueTimeMark? = null
fun timePassed(): Duration {
return mark?.elapsedNow() ?: Duration.INFINITE
}
fun markNow() {
mark = TimeSource.Monotonic.markNow()
}
fun markFarPast() {
mark = null
}
}