Author: jonathan
Date: Thu Aug 7 04:58:10 2008
New Revision: 30088
Modified:
trunk/languages/perl6/src/builtins/control.pir
Log:
[rakudo] Add a (currently wrong) implementation of time(). Sent a couple of
mails to try and ascertain how we can make this More Correct; in the meantime,
this allows you to do relative times OK (and will make my YAPC code examples
run ;-)).
Modified: trunk/languages/perl6/src/builtins/control.pir
==============================================================================
--- trunk/languages/perl6/src/builtins/control.pir (original)
+++ trunk/languages/perl6/src/builtins/control.pir Thu Aug 7 04:58:10 2008
@@ -125,6 +125,25 @@
.return ($N2)
.end
+
+=item time
+
+ our Time sub Control::Basic::time()
+
+XXX Should be returning a (currently unspec'd, it seems) Time object that
+numifies to a floating point value giving the number of seconds and
+fractional seconds since 2000. At the moment, just handing back what the
+Parrot time opcode does, since that doesn't give something with a consistent
+epoch. Mails sent about both issues, will fix when answers come back.
+
+=cut
+
+.sub 'time'
+ $N0 = time
+ .return ($N0)
+.end
+
+
=item eval
multi Control::Basic::eval ( Str $code, Grammar :$lang = CALLER::<$?PARSER>)