Skip to content

Commit

Permalink
JS clock fix
Browse files Browse the repository at this point in the history
  • Loading branch information
motorro committed May 30, 2024
1 parent f94e1eb commit 82ff25b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ allprojects {
kotlinOptions {
freeCompilerArgs += [
"-opt-in=kotlin.RequiresOptIn",
"-Xinline-classes"
"-Xinline-classes",
"-Xexpect-actual-classes"
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,8 @@ interface Clock {
/**
* System clock
*/
val SYSTEM: Clock = SystemClock
val SYSTEM: Clock = getSystemClock()
}
}

/**
* System clock
*/
internal expect object SystemClock: Clock
internal expect fun getSystemClock(): Clock
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ package com.motorro.rxlcemodel.common

import kotlin.js.Date

/**
* System clock
*/
internal actual object SystemClock : Clock {
internal actual fun getSystemClock(): Clock = object : Clock {
/**
* Current milliseconds value
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@

package com.motorro.rxlcemodel.common

/**
* System clock
*/
internal actual object SystemClock : Clock {
internal actual fun getSystemClock(): Clock = object : Clock {
/**
* Current milliseconds value
*/
Expand Down

0 comments on commit 82ff25b

Please sign in to comment.