diff --git a/solve/src/commonMain/kotlin/it/unibo/tuprolog/solve/stdlib/primitive/Sleep.kt b/solve/src/commonMain/kotlin/it/unibo/tuprolog/solve/stdlib/primitive/Sleep.kt index e89f18f6b..fcf0c977a 100644 --- a/solve/src/commonMain/kotlin/it/unibo/tuprolog/solve/stdlib/primitive/Sleep.kt +++ b/solve/src/commonMain/kotlin/it/unibo/tuprolog/solve/stdlib/primitive/Sleep.kt @@ -21,8 +21,9 @@ object Sleep : UnaryPredicate("sleep") { val initialTime = currentTimeInstant() val threshold = arguments[0].castTo().intValue.toLongExact() while (currentTimeInstant() - initialTime < threshold) { - yield(replySuccess()) + // busy waiting } + yield(replySuccess()) } } }