All Downloads are FREE. Search and download functionalities are using the official Maven repository.

iosArm64Main.common.Duration.objc.kt Maven / Gradle / Ivy

The newest version!
package com.github.fluidsonic.fluid.time

import platform.Foundation.*


fun Duration.Companion.of(platform: NSTimeInterval) =
	of(seconds = platform.toLong(), nanoseconds = ((platform % 1) * Nanoseconds.perSecond.toLong()).toLong())


fun Duration.toPlatform(): NSTimeInterval =
	seconds.toLong().toDouble() + (partialNanoseconds.toLong().toDouble() / Nanoseconds.perSecond.toLong())




© 2015 - 2024 Weber Informatics LLC | Privacy Policy