summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dotnet-library/scala/compat/Platform.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dotnet-library/scala/compat/Platform.scala b/src/dotnet-library/scala/compat/Platform.scala
index 44f0547707..e589860bdc 100644
--- a/src/dotnet-library/scala/compat/Platform.scala
+++ b/src/dotnet-library/scala/compat/Platform.scala
@@ -52,10 +52,10 @@ object Platform {
def currentTime: Long = 0L
/* // compiler crash :-(
- private val baseTime = new System.DateTime(1970, 1, 1, 0, 0, 0)
+ private lazy val baseTicks = (new System.DateTime(1970, 1, 1, 0, 0, 0)).Ticks
def currentTime: Long = {
- val nowTime = System.DateTime.UtcNow
- (nowTime.Ticks - baseTime.Ticks) / 10000
+ val nowTicks = System.DateTime.UtcNow.Ticks
+ (nowTicks - baseTicks) / 10000
}
*/
def collectGarbage { System.GC.Collect() }