From: Tim Vaughan Date: Fri, 14 Sep 2018 22:42:36 +0000 (+0200) Subject: Added time primitive. X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=5535d94778eef190b83d7ae246bf932d7dabd50b;p=forth.jl.git Added time primitive. --- diff --git a/src/forth.jl b/src/forth.jl index c298b72..a7425ae 100644 --- a/src/forth.jl +++ b/src/forth.jl @@ -1434,4 +1434,9 @@ DUMP = defPrimWord("DUMP", () -> begin return NEXT end) +TIME = defPrimWord("TIME", () -> begin + pushPS(Int64(time_ns())) + return NEXT +end) + end