Sorting-Algorithms-Visualizer icon indicating copy to clipboard operation
Sorting-Algorithms-Visualizer copied to clipboard

Added a continuous timer that updates during sorting

Open hlai1 opened this issue 1 year ago • 0 comments

Changes

  • added a timer box on bottom right of the screen
  • timer updates as the sorting algorithm is running and shows the final value

Why (resolves #169 and #170)

  • #169 was about implementing the time taken to sort feature, but @LucasPilla explained in the thread of replies how it would be nice to have the time updated with each iteration, rather than just displaying it at the end

How

  • Pulled the main branch of the repo
  • Added @SunnyWan59's changes to implement a static time box in the bottom right of the screen
  • Modified main.py to update display.timeBox and display.time_taken if the display wasn't paused

Testing

  • Visually confirmed that the time box was updating for different sorting algorithms

Screenshots

https://github.com/LucasPilla/Sorting-Algorithms-Visualizer/assets/66923491/052105e3-7eef-477e-aa85-7d4a5f233725

hlai1 avatar Dec 08 '23 04:12 hlai1