mirror of
https://github.com/enso-org/enso.git
synced 2024-11-23 08:08:34 +03:00
Fix System.nanoTime definition (#3543)
While redesigning builtins a bug was accidentally introduced. Stumbled upon accidentally while trying to run `test/Benchmarks`.
This commit is contained in:
parent
972b34d1a9
commit
8f9a0b33d5
@ -32,8 +32,8 @@ public class System {
|
||||
|
||||
@Builtin.Method(description = "Gets the nanosecond resolution system time.")
|
||||
@CompilerDirectives.TruffleBoundary
|
||||
public static void nanoTime() {
|
||||
java.lang.System.nanoTime();
|
||||
public static long nanoTime() {
|
||||
return java.lang.System.nanoTime();
|
||||
}
|
||||
|
||||
@Builtin.Method(description = "Exits the process, returning the provided code.")
|
||||
|
@ -59,6 +59,7 @@ import project.Runtime.Lazy_Generator_Spec
|
||||
import project.System.File_Spec
|
||||
import project.System.Process_Spec
|
||||
import project.System.Reporting_Stream_Decoder_Spec
|
||||
import project.System.System_Spec
|
||||
|
||||
main = Test.Suite.run_main <|
|
||||
Any_Spec.spec
|
||||
@ -112,3 +113,4 @@ main = Test.Suite.run_main <|
|
||||
Vector_Spec.spec
|
||||
Statistics_Spec.spec
|
||||
Warnings_Spec.spec
|
||||
System_Spec.spec
|
||||
|
9
test/Tests/src/System/System_Spec.enso
Normal file
9
test/Tests/src/System/System_Spec.enso
Normal file
@ -0,0 +1,9 @@
|
||||
from Standard.Base import all
|
||||
|
||||
import Standard.Base.System
|
||||
import Standard.Test
|
||||
|
||||
spec = Test.group "System" <|
|
||||
Test.specify "should provide nanosecond timer" <|
|
||||
result = System.nano_time
|
||||
(result > 0).should_equal True
|
Loading…
Reference in New Issue
Block a user