import time
from multiprocessing import Process
start_time = time.time()
def get_data():
while True:
time.sleep(2)
print('休眠2秒钟')
def jisuan():
print('开始计算,用时10秒')
time.sleep(10)
print('结束计算,用时10秒')
def main():
pw = Process(target=get_data)
pr = Process(target=jisuan)
pw.start()
pr.start()
# 等待大规模计算完成
pr.join()
# 结束系统数据统计
pw.terminate()
if __name__ == '__main__':
main()
print('11')