Add operators to get elapsed time
A stack-oriented programming language suitable for code golfing
Status: Alpha
Brought to you by:
aditsu
Add extended operators akin to Matlab's tic
and toc
. tic
remembers the current timestamp in some internal state and toc
returns the time elapsed since the last tic
. Ideally there would be an implicit tic
at the beginning of the program.
One could make them even more powerful by giving the timers created by tic
names, so that you can do nested time measurements, but I don't see how that would be possible without always requiring a name, which would make the basic use case longer again, so I'd rather not have that, or defer it to separate operators.