1import time
2start_time = time.time()
3print("Hello") # Hello
4end_time = time.time()
5total_time = end_time - start_time
6print("Time: ", total_time)
1from time import time
2
3start = time()
4#code here
5print(f'Time taken to run: {time() - start} seconds'
1import time
2start_time = time.time()
3main()
4print("--- %s seconds ---" % (time.time() - start_time))
1#its tricky and so much easy
2#python execute time counter
3#coded by Luban
4import time
5start_time = time.time()
6while True:
7 x = time.time() - start_time
8 x = int(x)
9 print('Current Time = ',str(x))
1#Python time execution
2import time
3start_time = time.time()
4print("Hello") # Hello
5end_time = time.time()
6total_time = end_time - start_time
7print("Time: ", total_time)