Linux' system time change and Wait()
Posted: Tue Mar 08, 2022 6:52 pm
Hi
My current project of a music player with lyrics runs on a Raspberry Pi which has a read-only operating system so that you can turn off the device without shutting it down. And the device has network access.
Since the Raspberry does not have a battery-backed clock, it runs with an old system time for a while after startup. After a few minutes it sets the clock.
This caused strange effects in my program, which are caused by the fact that the Hollywood timers seem to depend on the system time. If the date makes a jump from 1/28/2022 to 3/8/2022, the timer that runs continuously from the beginning has then a value about -901000000.
I have fixed most of the effects in the meantime with workarounds, only the running music reports a wrong position (and so the displayed text is out of sync), for which I have not found a fix. But with the next music it is correct again.
In the program Wait() is also used in some places. My question now is: Do I have to expect effects with Wait as well? I have tried and my experiments say no, but I better ask.
Ralf
My current project of a music player with lyrics runs on a Raspberry Pi which has a read-only operating system so that you can turn off the device without shutting it down. And the device has network access.
Since the Raspberry does not have a battery-backed clock, it runs with an old system time for a while after startup. After a few minutes it sets the clock.
This caused strange effects in my program, which are caused by the fact that the Hollywood timers seem to depend on the system time. If the date makes a jump from 1/28/2022 to 3/8/2022, the timer that runs continuously from the beginning has then a value about -901000000.
I have fixed most of the effects in the meantime with workarounds, only the running music reports a wrong position (and so the displayed text is out of sync), for which I have not found a fix. But with the next music it is correct again.
In the program Wait() is also used in some places. My question now is: Do I have to expect effects with Wait as well? I have tried and my experiments say no, but I better ask.
Ralf