import multiprocessing
import time

start = time.perf_counter()


def do_something():
   print("Sleep 1 second")
   time.sleep(1)
   print('Done sleeping')

proccess = []

for _ in range(10):
    p = multiprocessing.Process(target=do_something)
    p.start()
    proccess.append(p)

for proccesses in proccess:
    proccesses.join()


finish = time.perf_counter()

print(f'Finished in {round(finish-start, 2)} second(s)')
a5f1f1e9d0ecac6ce32d8c9911c5b0f522b904ca
<mask token>


def do_something():
    print('Sleep 1 second')
    time.sleep(1)
    print('Done sleeping')


<mask token>

<mask token>


def do_something():
    print('Sleep 1 second')
    time.sleep(1)
    print('Done sleeping')


<mask token>
for _ in range(10):
    p = multiprocessing.Process(target=do_something)
    p.start()
    proccess.append(p)
for proccesses in proccess:
    proccesses.join()
<mask token>
print(f'Finished in {round(finish - start, 2)} second(s)')

<mask token>
start = time.perf_counter()


def do_something():
    print('Sleep 1 second')
    time.sleep(1)
    print('Done sleeping')


proccess = []
for _ in range(10):
    p = multiprocessing.Process(target=do_something)
    p.start()
    proccess.append(p)
for proccesses in proccess:
    proccesses.join()
finish = time.perf_counter()
print(f'Finished in {round(finish - start, 2)} second(s)')

import multiprocessing
import time
start = time.perf_counter()


def do_something():
    print('Sleep 1 second')
    time.sleep(1)
    print('Done sleeping')


proccess = []
for _ in range(10):
    p = multiprocessing.Process(target=do_something)
    p.start()
    proccess.append(p)
for proccesses in proccess:
    proccesses.join()
finish = time.perf_counter()
print(f'Finished in {round(finish - start, 2)} second(s)')

import multiprocessing
import time

start = time.perf_counter()


def do_something():
   print("Sleep 1 second")
   time.sleep(1)
   print('Done sleeping')

proccess = []

for _ in range(10):
    p = multiprocessing.Process(target=do_something)
    p.start()
    proccess.append(p)

for proccesses in proccess:
    proccesses.join()


finish = time.perf_counter()

print(f'Finished in {round(finish-start, 2)} second(s)')