1818 Execution time of this setup statement is NOT timed.
1919 -p/--process: use time.process_time() (default is time.perf_counter())
2020 -v/--verbose: print raw timing results; repeat for more digits precision
21- -u/--unit: set the output time unit (usec, msec, or sec)
21+ -u/--unit: set the output time unit (nsec, usec, msec, or sec)
2222 -h/--help: print this usage message and exit
2323 --: separate options from statement, use when statement starts with -
2424 statement: statement to be timed (default 'pass')
@@ -272,7 +272,7 @@ def main(args=None, *, _wrap_timer=None):
272272 repeat = default_repeat
273273 verbose = 0
274274 time_unit = None
275- units = {"usec" : 1e-6 , "msec" : 1e-3 , "sec" : 1.0 }
275+ units = {"nsec" : 1e-9 , " usec" : 1e-6 , "msec" : 1e-3 , "sec" : 1.0 }
276276 precision = 3
277277 for o , a in opts :
278278 if o in ("-n" , "--number" ):
@@ -283,7 +283,7 @@ def main(args=None, *, _wrap_timer=None):
283283 if a in units :
284284 time_unit = a
285285 else :
286- print ("Unrecognized unit. Please select usec, msec, or sec." ,
286+ print ("Unrecognized unit. Please select nsec, usec, msec, or sec." ,
287287 file = sys .stderr )
288288 return 2
289289 if o in ("-r" , "--repeat" ):
0 commit comments