From b622642aa1c661703198ef05efffba1ca4e9a8d7 Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Mon, 26 Mar 2018 22:30:25 +0200 Subject: [PATCH] Simplify timer selection to always use time.time() (#175) In python2.7 and python3.3, time.time() is sufficient accurate for our purpose and avoids going through hoops to select the best available function. Signed-off-by: Niels Thykier --- scour/scour.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scour/scour.py b/scour/scour.py index 1e990c4..7f136a5 100644 --- a/scour/scour.py +++ b/scour/scour.py @@ -74,11 +74,10 @@ VER = __version__ COPYRIGHT = u'Copyright Jeff Schiller, Louis Simard, 2010' -# select the most precise walltime measurement function available on the platform -if sys.platform.startswith('win'): - walltime = time.clock -else: - walltime = time.time +# the walltime measurement function, we will use for reporting +# reporting how long it took to process a given SVG file. For our +# purposes, the time.time() function has sufficent accuracy. +walltime = time.time NS = {'SVG': 'http://www.w3.org/2000/svg',