Kaydet (Commit) c864ad69 authored tarafından Guido van Rossum's avatar Guido van Rossum

Nit: round delays to 0.1 second.

üst edca74a6
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment