diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-03-12 18:39:35 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-03-12 18:39:35 +0100 |
| commit | 1acd2e98d6739c48e43c82356a44a0694b5276ed (patch) | |
| tree | 755ddf620183a3dc41d9cda0133064a2806d22db /src | |
| parent | e659355052d5a86a9770922bf32c74004aff9105 (diff) | |
| parent | bab61a93d6167a552a76e538ec2929bf3eb3bb36 (diff) | |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Clock.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Fl_Clock.cxx b/src/Fl_Clock.cxx index a9271452b..ca7237212 100644 --- a/src/Fl_Clock.cxx +++ b/src/Fl_Clock.cxx @@ -213,7 +213,10 @@ static void tick(void *v) { int usec; Fl::system_driver()->gettime(&sec, &usec); ((Fl_Clock*)v)->value((ulong)sec); - Fl::add_timeout((1000000 - usec)/1000000., tick, v); // time till next second + + // schedule timer event slightly later than the next second (+25 ms) + // to prevent multiple timer events if triggered too early (STR 3516) + Fl::add_timeout((1025000 - usec)/1000000., tick, v); } int Fl_Clock::handle(int event) { |
