I want to write a program which needs to get a tick event each second. The program runs many hours and the tick must be in line with the seconds of the system clock. To use any kind of timer which fires an event each second is no good idea. There are to many inaccuracies. If you have an inaccuracy of 100ms per second, the timer is 6 minus behind the system clock each hour. But, it must be exact in line with the system clock.
To get an event from the system clock is ok.
To have inaccuracies is ok for single seconds but not over all.
What is your suggestion to solve this?
The solution must work on c# net6 (I plan to run the program on Windows and Linux).
Thanks