import time def time_watcher(): print('--- %s seconds ---' % (time.time() - start_time)) def main(): pass if __name__ == '__main__': start_time = time.time() main() time_watcher()