Skip to content

Commit

Permalink
fixed runtime display bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobpennington committed Mar 11, 2024
1 parent 6d41499 commit 5b0f9a4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions kilosort/run_kilosort.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,8 +477,12 @@ def save_sorting(ops, results_dir, st, clu, tF, Wall, imin, tic0=np.nan,
print(f'{int(is_ref.sum())} units found with good refractory periods')

runtime = time.time()-tic0
print(f'\nTotal runtime: {runtime:.2f}s = {int(runtime//3600):02d}:' +
f'{int(runtime//60):02d}:{int(runtime%60)} h:m:s')
seconds = runtime % 60
mins = runtime // 60
hrs = mins // 60
mins = mins % 60
print(f'\nTotal runtime: {runtime:.2f}s = {int(hrs):02d}:' +
f'{int(mins):02d}:{round(seconds)} h:m:s')
ops['runtime'] = runtime

io.save_ops(ops, results_dir)
Expand Down

0 comments on commit 5b0f9a4

Please sign in to comment.