AqualinkD icon indicating copy to clipboard operation
AqualinkD copied to clipboard

ballle98/AqualinkD#13: add time sync

Open ballle98 opened this issue 4 years ago • 2 comments

fix #93

ballle98 avatar Sep 25 '19 18:09 ballle98

The reason the tm structure was added to aquadata was a way to pass data from the thread reading the screen and the thread setting the values. It would be very inefficient to convert this data to a string then back to a tm struct because it is getting updated many times in this transaction.

ballle98 avatar Oct 23 '19 15:10 ballle98

I'll go over the changes what I get some time. But previous implementation was inefficient, that's why I asked for changes and for it to fit within the current code structure. Remember you get time as a string, pass it to the UI as a string, and update it as a string, and there is no reason to check it every time you get a new time. So using the currently implemented logic, the time string only get's converted to time datatype every hour or so when you need to check the time is in-sync (might be every 10 mins, I can't remember). But at that check is the only time you actually need to convert the time string.

sfeakes avatar Oct 23 '19 17:10 sfeakes

@sfeakes I have rebased and updated this pull request to the latest version.

I have tested this thoroghly with my PDA pannel and it synce the time correctly.

I have granted permision to for you to modify this pull requests if you want to change anything before merging https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork

There are instructions for working with the pull offline on a branch again you can make changes in additional commits before merging https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally?tool=webui

attached logs showing it working

stdout-20230528_2203.txt

ballle98 avatar May 29 '23 03:05 ballle98