Added time primitive.
authorTim Vaughan <tgvaughan@gmail.com>
Fri, 14 Sep 2018 22:42:36 +0000 (00:42 +0200)
committerTim Vaughan <tgvaughan@gmail.com>
Fri, 14 Sep 2018 22:42:36 +0000 (00:42 +0200)
src/forth.jl

index c298b72..a7425ae 100644 (file)
@@ -1434,4 +1434,9 @@ DUMP = defPrimWord("DUMP", () -> begin
     return NEXT
 end)
 
+TIME = defPrimWord("TIME", () -> begin
+    pushPS(Int64(time_ns()))
+    return NEXT
+end)
+
 end