huwwp / cryptop

command line crypto portfolio
MIT License
235 stars 41 forks source link

Fix/busy cpu #14

Closed juanjux closed 7 years ago

juanjux commented 7 years ago

This PR adds a configurable active sleep (0.3 seconds by default) to avoid taking 100% of the CPU on the busy loop. It also changes the logic inside the main loop to remove the unneded inner while loop.

juanjux commented 7 years ago

I'm closing this one - I'll try to make another PR with a better way: doing a blocking getch but retrieving and updating the data and screen asynchronously if the data changed.