Add timing words, improve keyword display.

This commit is contained in:
Russ Olsen 2020-06-17 13:58:24 -04:00
parent 47554de9f4
commit 480f6df6a5
2 changed files with 10 additions and 1 deletions

View file

@ -83,6 +83,7 @@ unique 'map-marker =!
: callable? { builtins/callable !!1 }
: sleep { time/sleep !!1 drop }
: ctime { time/ctime !!0 }
: now { time/time !!0 }
/ Set the interactive prompt.
@ -114,8 +115,13 @@ unique 'map-marker =!
ns? not ifelse { "Namespace " . . " not loaded." p }
{ "Namespace " . . " loaded." p }
}
/ Time execution
: time[ { now }
: ]time { now swap - }
/ Documentartion
/ Documentation
: ->doc { *last-word* setdoc }
: __doc__ { <. $? '__doc__ .> }

View file

@ -16,3 +16,6 @@ class Keyword(UserString):
def __repr__(self):
return ':' + str(self)
def __str__(self):
return ':' + self.data