#!/usr/bin/env python

import random
import time

timeout = random.randint(1, 5)

start = time.time()

print(f'Spinning for {timeout} seconds')

while True:
    now = time.time()
    if (now - start) >= timeout:
        break
