Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/src/main/kotlin/net/llvg/llvg_utils/time/utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,46 @@ package net.llvg.llvg_utils.time

import kotlin.internal.InlineOnly

@Deprecated("")
public const val nanoSecondToMicroSecond: Double = 1_000.0

@Deprecated("")
public const val nanoSecondToMilliSecond: Double = 1_000_000.0

@Deprecated("")
public const val nanoSecondToSecond: Double = 1_000_000_000.0

/**
* @see System.nanoTime
*/
@InlineOnly
@Deprecated("")
public inline val systemNanoTime: Long
get() = System.nanoTime()

/**
* @see System.nanoTime
*/
@InlineOnly
@Deprecated("")
@Suppress("DEPRECATION")
public inline val systemMicroTime: Double
get() = System.nanoTime() / nanoSecondToMicroSecond

/**
* @see System.nanoTime
*/
@InlineOnly
@Deprecated("")
@Suppress("DEPRECATION")
public inline val systemMilliTime: Double
get() = System.nanoTime() / nanoSecondToMilliSecond

/**
* @see System.nanoTime
*/
@InlineOnly
@Deprecated("")
@Suppress("DEPRECATION")
public inline val systemTime: Double
get() = System.nanoTime() / nanoSecondToSecond