Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: third_party/cython/src/Cython/Plex/Timing.py

Issue 385073004: Adding cython v0.20.2 in third-party. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reference cython dev list thread. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/cython/src/Cython/Plex/Scanners.py ('k') | third_party/cython/src/Cython/Plex/Traditional.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/cython/src/Cython/Plex/Timing.py
diff --git a/third_party/cython/src/Cython/Plex/Timing.py b/third_party/cython/src/Cython/Plex/Timing.py
new file mode 100644
index 0000000000000000000000000000000000000000..f47c5c89de7bfd3ebd9833a065edd99d5c4fef2b
--- /dev/null
+++ b/third_party/cython/src/Cython/Plex/Timing.py
@@ -0,0 +1,22 @@
+#
+# Get time in platform-dependent way
+#
+
+import os
+from sys import platform, exit, stderr
+
+if platform == 'mac':
+ import MacOS
+ def time():
+ return MacOS.GetTicks() / 60.0
+ timekind = "real"
+elif hasattr(os, 'times'):
+ def time():
+ t = os.times()
+ return t[0] + t[1]
+ timekind = "cpu"
+else:
+ stderr.write(
+ "Don't know how to get time on platform %s\n" % repr(platform))
+ exit(1)
+
« no previous file with comments | « third_party/cython/src/Cython/Plex/Scanners.py ('k') | third_party/cython/src/Cython/Plex/Traditional.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698