import time

t0 = time.perf_counter()

# operation

t1 = time.perf_counter()

time_ms = (t1 - t0) * 1000

