pomatez icon indicating copy to clipboard operation
pomatez copied to clipboard

timer slower in background in tauri version

Open Inori-Lover opened this issue 4 months ago • 4 comments

Describe the bug when choose tauri version, after hidden the main window, the clock become much slower then real time.

To Reproduce

  1. start the tauri version pomatez
  2. mark the time, close to tray
  3. after about 10 minutes
  4. open the main, compare time

Expected behavior time go as fast as system clock

Desktop (please complete the following information):

Additional context similar issue: https://github.com/zidoro/pomatez/issues/67 seem related issue: https://github.com/tauri-apps/tauri/issues/5250

Inori-Lover avatar Feb 26 '24 00:02 Inori-Lover

I need to rework the timer code anyway to support a mobile version, Though currently the code has a timer triggering every 1 second. When the browser goes into the background it tends to slow the number of functions that can trigger in the background. I am assuming this is going above the 1 second hence slowing this down. I am not sure when I will have time to address this properly, though I can take a look at making it validate the time remaining based on a start time rather than time remaining.

sekwah41 avatar Feb 26 '24 01:02 sekwah41

@sekwah41 thanks for quick response! it sound like a good work

Inori-Lover avatar Feb 26 '24 01:02 Inori-Lover

sorry for the wrong operate.

Inori-Lover avatar Feb 26 '24 01:02 Inori-Lover