From 99812d1bfa48e70a4eab14926df770b94d033630 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Mon, 13 Nov 2017 00:37:20 +0300 Subject: [PATCH] Call from native System.currentTimeMillis --- .../java/org/teavm/classlib/java/lang/SystemNativeGenerator.java | 1 + 1 file changed, 1 insertion(+) diff --git a/classlib/src/main/java/org/teavm/classlib/java/lang/SystemNativeGenerator.java b/classlib/src/main/java/org/teavm/classlib/java/lang/SystemNativeGenerator.java index effde2a10..7189a4ab4 100644 --- a/classlib/src/main/java/org/teavm/classlib/java/lang/SystemNativeGenerator.java +++ b/classlib/src/main/java/org/teavm/classlib/java/lang/SystemNativeGenerator.java @@ -84,6 +84,7 @@ public class SystemNativeGenerator implements Generator, DependencyPlugin { } private void generateCurrentTimeMillis(SourceWriter writer) throws IOException { + writer.append(writer.getNaming().getNameFor("java.lang.System")).append("_$callClinit();").softNewLine(); writer.append("return Long_fromNumber(new Date().getTime());").softNewLine(); }