From 3266aa1cb80d3caaeedbd003787791c2ad7a1555 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Wed, 30 Apr 2014 19:31:03 +0200 Subject: [PATCH] render time script: also print milliseconds --- data/scripts/rendertime.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) mode change 100644 => 100755 data/scripts/rendertime.py diff --git a/data/scripts/rendertime.py b/data/scripts/rendertime.py old mode 100644 new mode 100755 index 46f7012d..9b24e57f --- a/data/scripts/rendertime.py +++ b/data/scripts/rendertime.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + import subprocess, sys, re if len(sys.argv) == 1: @@ -19,12 +21,13 @@ for arg in sys.argv[1:]: ['d', 60*60*24], ['h', 60*60], ['m', 60], - ['s', 1] + ['s', 1], + ['ms', 0.001] ]; for unit in units: - if value[-1] == unit[0]: - value = float(value[0:-1]) * unit[1] + if value[-len(unit[0]):] == unit[0]: + value = float(value[0:-len(unit[0])]) * unit[1] break force = False