10 lines
289 B
Kotlin
10 lines
289 B
Kotlin
package solutions.tretter.mindmachine.session
|
|
|
|
import kotlin.math.roundToInt
|
|
|
|
private const val MILLIS_PER_SECOND = 1000f
|
|
|
|
fun flashIntervalMsToSeconds(ms: Int): Float = ms / MILLIS_PER_SECOND
|
|
|
|
fun flashIntervalSecondsToMs(seconds: Float): Int = (seconds * MILLIS_PER_SECOND).roundToInt()
|