diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2017-06-18 20:43:04 +0200 | 
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-06-18 20:43:04 +0200 | 
| commit | 05ae33e66f521af4fb19ff3e733753d43334d5ab (patch) | |
| tree | 0c5fc3c323173001b9c662351c5c8f549deef2a2 /logic | |
| parent | a0750afba4269cab9658abf7453e99660f0cb095 (diff) | |
logic/tracker: fix sleep always for 0 ms
On @mrSanchos' machine the `const_sleep_ms' variable
was zero-initializer rather than set to the right
value.
Workaround this by dropping the `static' storage
duration.
Diffstat (limited to 'logic')
| -rw-r--r-- | logic/tracker.cpp | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/logic/tracker.cpp b/logic/tracker.cpp index 57995d37..c1459286 100644 --- a/logic/tracker.cpp +++ b/logic/tracker.cpp @@ -390,7 +390,7 @@ void Tracker::run()      {          logic(); -        static constexpr ns const_sleep_ms(time_cast<ns>(ms(4))); +        constexpr ns const_sleep_ms(time_cast<ns>(ms(4)));          const ns elapsed_nsecs = prog1(t.elapsed<ns>(), t.start());          if (backlog_time > secs_(3) || backlog_time < secs_(-3)) @@ -403,7 +403,7 @@ void Tracker::run()          backlog_time += ns(elapsed_nsecs - const_sleep_ms);          const int sleep_time_ms = time_cast<ms>(clamp(const_sleep_ms - backlog_time, -                                                       ms::zero(), ms(10))).count(); +                                                      ms::zero(), ms(10))).count();  #if 0          qDebug() << "sleepy time" << sleep_time_ms  | 
