Implemented basic time functins.
h3rald h3rald@h3rald.com
Sun, 07 Dec 2014 21:12:50 +0100
2 files changed,
9 insertions(+),
2 deletions(-)
M
primitives.nim
→
primitives.nim
@@ -1,4 +1,4 @@
-import tables, strutils, os, osproc +import tables, strutils, os, osproc, times import parser, interpreter, utils minsym "exit":@@ -445,6 +445,14 @@ if a.isBool and b.isBool:
i.push newVal(a.boolVal xor b.boolVal) else: i.error(errIncorrect, "Two bool values are required on the stack") + +# Time + +minsym "timestamp": + i.push getTime().int.newVal + +minsym "now": + i.push epochTime().newVal # I/O