[pypy-svn] r28886 - pypy/dist/pypy/translator/cli/src

antocuni at codespeak.net antocuni at codespeak.net
Fri Jun 16 16:33:46 CEST 2006


Author: antocuni
Date: Fri Jun 16 16:33:42 2006
New Revision: 28886

Modified:
   pypy/dist/pypy/translator/cli/src/pypylib.cs
Log:
Added support for time.clock. Now gencli is able to compile and run
both pystone and richards.



Modified: pypy/dist/pypy/translator/cli/src/pypylib.cs
==============================================================================
--- pypy/dist/pypy/translator/cli/src/pypylib.cs	(original)
+++ pypy/dist/pypy/translator/cli/src/pypylib.cs	Fri Jun 16 16:33:42 2006
@@ -91,6 +91,13 @@
             TimeSpan t = (DateTime.UtcNow - new DateTime(1970, 1, 1));
             return t.TotalSeconds;
         }
+
+        static DateTime ClockStart = DateTime.UtcNow;
+        public static double Clock()
+        {
+            return (DateTime.UtcNow - ClockStart).TotalSeconds;
+        }
+
     }
 
     public class StringBuilder



More information about the Pypy-commit mailing list