petargyurov / megadetector-gui

A desktop application that makes using MegaDetector's model easier
43 stars 2 forks source link

ETA Timer Fix #19

Closed petargyurov closed 3 years ago

petargyurov commented 3 years ago

The previous ETA timer only got updated when the backend updated the progress. For GPU machines this meant that the timer got updated pretty much once a second, but for non-GPU machines the processing time is much slower.

This solution adds a basic method using setInterval to update the time left each second. Whenver the backend updates the time, the function just picks up from there. This will cause jumps in the time, but that's a non-issue.

⚠️ I have noticed that it sometimes hangs, but I am not sure why. If it has a big impact on performance I will look at it again.

Fixes #14