repo.or.cz
/
chromium-blink-merge.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git]
/
third_party
/
cython
/
src
/
Cython
/
Plex
/
Timing.py
blob
f47c5c89de7bfd3ebd9833a065edd99d5c4fef2b
1
#
2
# Get time in platform-dependent way
3
#
4
5
import
os
6
from
sys
import
platform
,
exit
,
stderr
7
8
if
platform
==
'mac'
:
9
import
MacOS
10
def
time
():
11
return
MacOS
.
GetTicks
() /
60.0
12
timekind
=
"real"
13
elif
hasattr
(
os
,
'times'
):
14
def
time
():
15
t
=
os
.
times
()
16
return
t
[
0
] +
t
[
1
]
17
timekind
=
"cpu"
18
else
:
19
stderr
.
write
(
20
"Don't know how to get time on platform
%s
\n
"
%
repr
(
platform
))
21
exit
(
1
)
22