mono icon indicating copy to clipboard operation
mono copied to clipboard

Settings datetime in Linux causes Windows Forms Timer to stop

Open MartinLundholm opened this issue 4 years ago • 2 comments

Steps to Reproduce

  1. I have a C# winform application which runs on an Raspberry Pi. It uses Windows Form Timers for various purposes, and I recently spent a few days hunting the cause of a bug which makes the timers freeze. The cause was found to be that datetime was set a few seconds after the C# application was started (the RBPi does not have an RTC so time is set from another PCB via a serial port).

Current Behavior

Expected Behavior

On which platforms did you notice this

[ ] macOS [ ] Linux [ ] Windows

Version Used:

Stacktrace

Please paste the stack trace here if available.

MartinLundholm avatar Jan 29 '22 13:01 MartinLundholm

Was fixed in #20596

sancheolz avatar Jan 29 '22 20:01 sancheolz

This is still a problem in mono version 6.12.0.199 on Linux/Ubuntu/Yocto kernel 5.15.137.71. Setting back the system time 1 minute using "timedatectl set-time "2024-06-02 12:06"" on the Linux command line causes the Windows Forms Timer to stop for 1 minute even if the timer is set to fire once per second.

kriskazmar avatar Jun 02 '24 16:06 kriskazmar