From e58a4612ef8e8c40ec22ec5608f9cfa28725ab1c Mon Sep 17 00:00:00 2001 From: guanjihuan Date: Fri, 15 Aug 2025 16:21:34 +0800 Subject: [PATCH] Update parallel_calculations_with_python_using_Pool.py --- .../parallel_calculations_with_python_using_Pool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2020.06.01_parallel_calculations_with_python/parallel_calculations_with_python_using_Pool.py b/2020.06.01_parallel_calculations_with_python/parallel_calculations_with_python_using_Pool.py index 922578f..7987404 100644 --- a/2020.06.01_parallel_calculations_with_python/parallel_calculations_with_python_using_Pool.py +++ b/2020.06.01_parallel_calculations_with_python/parallel_calculations_with_python_using_Pool.py @@ -15,9 +15,9 @@ def run_proc(name): return name if __name__ == '__main__': - start_time = time.time() + start_time = time.perf_counter() with multiprocessing.Pool() as pool: results = pool.map(run_proc, [f"task {i}" for i in range(64)]) - end_time = time.time() + end_time = time.perf_counter() print(results) print(end_time - start_time) \ No newline at end of file