tulleuchen / jirastopwatch

Not MORE timetracking - just EASIER timetracking
http://jirastopwatch.com
Apache License 2.0
143 stars 99 forks source link

1.9.0-pre1: Saved time not restored after restart #48

Closed eviweb closed 7 years ago

eviweb commented 7 years ago

Hi @carstengehling, I've just installed the version 1.9.0-pre1 and realized that when the parameter Save current timetracking, pause active timer is enabled on program exit, the time is no more saved (or incorrectly restored). It seems to work as expected with Save current timetracking, active timer continues. Eric

carstengehling commented 7 years ago

Thank you for pointing out. I've tried it myself now, and you are right. I'll get this fixed.

carstengehling commented 7 years ago

I found that it was only one special condition, that made this happen. Only the active/running timer did not get its time saved. If a timer was paused first, then it did get saved correctly. In any case I've fixed the bug now. Thanks again for pointing it out.

slarti-b commented 7 years ago

I had a case where I had put my computer to sleep. Not 100% sure if I paused the timer first or not but I guess not. I run with Save current timetracking, pause active timer When i started the computer it said 2 days plus, so it hadn't paused the timer. Or so it appeared - I stopped the application and restarted it (to test the issue I reported) and when ti restarted it had 1h 58m as the time for that issue. So it looks like it had paused saved the time, but not the display time or something.

Do you think this will also be fixed by the fix to this issue? Will update and try to repeat.

carstengehling commented 7 years ago

Well, sleeping isn't exactly the same thing. In this case, the timer will pick up where it left, when the PC awakes.

When you press "play" on a timer. A start-time is stored. The displayed elapsed time is actually a calculated field = DateTime.Now - StartTime. So if the PC just sleeps these calculated fields will not be stored as actual values. Instead StopWatch will act just as if the PC has been running all the time.