]> granicus.if.org Git - python/commitdiff
Nit: round delays to 0.1 second.
authorGuido van Rossum <guido@python.org>
Fri, 18 Jul 1997 23:50:22 +0000 (23:50 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 18 Jul 1997 23:50:22 +0000 (23:50 +0000)
Lib/test/test_thread.py

index 8a1f435214af198f2846560b60a0e4e729f1bed0..113135bef9d0f4de463f419667e9125875aae1f4 100644 (file)
@@ -21,7 +21,7 @@ def task(ident):
        delay = whrandom.random() * numtasks
        whmutex.release()
        if verbose:
-           print 'task', ident, 'will run for', delay, 'sec'
+           print 'task', ident, 'will run for', round(delay, 1), 'sec'
        time.sleep(delay)
        if verbose:
            print 'task', ident, 'done'
@@ -89,7 +89,7 @@ def task2(ident):
                        delay = whrandom.random() * numtasks
                        whmutex.release()
                if verbose:
-                   print 'task', ident, 'will run for', delay, 'sec'
+                   print 'task', ident, 'will run for', round(delay, 1), 'sec'
                time.sleep(delay)
                if verbose:
                    print 'task', ident, 'entering barrier', i