diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2021-03-26 13:52:33 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2021-03-26 13:52:33 +0100 |
commit | 0f27805eedcc40ae34009aa31a4dc08cb949f867 (patch) | |
tree | 8b1c8995d7fdab97acde4bd7c63f96d378c34d02 /debian/pyrex/pyrex-0.9.9/Pyrex/Plex/Timing.py | |
parent | bad411472a12b93f8bfca6b7ca52d89488a8d8ce (diff) | |
download | extra-dependencies-0f27805eedcc40ae34009aa31a4dc08cb949f867.tar.gz extra-dependencies-0f27805eedcc40ae34009aa31a4dc08cb949f867.zip |
DEB pyrex: Added to repository.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'debian/pyrex/pyrex-0.9.9/Pyrex/Plex/Timing.py')
-rwxr-xr-x | debian/pyrex/pyrex-0.9.9/Pyrex/Plex/Timing.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/debian/pyrex/pyrex-0.9.9/Pyrex/Plex/Timing.py b/debian/pyrex/pyrex-0.9.9/Pyrex/Plex/Timing.py new file mode 100755 index 00000000..f47c5c89 --- /dev/null +++ b/debian/pyrex/pyrex-0.9.9/Pyrex/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) + |