diff --git a/compiler/daemon/src/org/jetbrains/kotlin/daemon/LazyClasspathWatcher.kt b/compiler/daemon/src/org/jetbrains/kotlin/daemon/LazyClasspathWatcher.kt index 668e1aab81c..c3963a720f8 100644 --- a/compiler/daemon/src/org/jetbrains/kotlin/daemon/LazyClasspathWatcher.kt +++ b/compiler/daemon/src/org/jetbrains/kotlin/daemon/LazyClasspathWatcher.kt @@ -64,7 +64,7 @@ class LazyClasspathWatcher(classpath: Iterable, .flatMap { it.walk().filter(::isClasspathFile) } .map { FileId(it, it.lastModified(), it.md5Digest()) } .toList() - val nowMs = TimeUnit.MILLISECONDS.toMillis(System.nanoTime()) + val nowMs = TimeUnit.NANOSECONDS.toMillis(System.nanoTime()) lastUpdate.set(nowMs) lastDigestUpdate.set(nowMs) } @@ -80,7 +80,7 @@ class LazyClasspathWatcher(classpath: Iterable, val isChanged: Boolean get() { if (lastChangedStatus.get()) return true - val nowMs = TimeUnit.MILLISECONDS.toMillis(System.nanoTime()) + val nowMs = TimeUnit.NANOSECONDS.toMillis(System.nanoTime()) if (nowMs - lastUpdate.get() < checkPeriod) return false val checkDigest = nowMs - lastDigestUpdate.get() > digestCheckPeriod @@ -106,7 +106,7 @@ class LazyClasspathWatcher(classpath: Iterable, true // io error considered as change } } != null - lastUpdate.set(TimeUnit.MILLISECONDS.toMillis(System.nanoTime())) + lastUpdate.set(TimeUnit.NANOSECONDS.toMillis(System.nanoTime())) if (checkDigest) lastDigestUpdate.set(lastUpdate.get()) return changed