Page MenuHomePhabricator

Timer Interval: fix incorrect time update.

Authored by NikaWhite on Dec 7 2017, 4:15 AM.



In case when time "from" equal 0 and try to setup 0 for time "to" caused
wrong time calculation. The value of time "from" goes to be bigger than
time "to".
This commit add if branch for catch that situation.

Test Plan
  1. Open time range window.
  2. Set "To" time to exactly 1h
  3. Decrease "To" hours by one by clicking arrow.

Result: Range is from 0us to 10us.

Diff Detail

No Linters Available
No Unit Test Coverage
Build Status
Buildable 5401
Build 5913: arc lint + arc unit
NikaWhite created this revision.Dec 7 2017, 4:15 AM
Deepwarrior edited the summary of this revision. (Show Details)Dec 7 2017, 5:55 AM
Deepwarrior requested changes to this revision.EditedDec 7 2017, 6:04 AM

Reproduce steps:

  1. make "to" 1h.
  2. make "from" 1h
  3. decrease hours in "to" by 1.
And other strange behavior, that not related to this bug, but related to time range feature:
  1. Make interval from 0 to 1 us
  2. decrease "to" by 1 us

Expected: interval is minimized and shouldn't be changed.
Result: Interval become from 0 to 10 us.

This revision now requires changes to proceed.Dec 7 2017, 6:04 AM
i.furs accepted this revision.Dec 7 2017, 8:36 AM
Deepwarrior accepted this revision.Dec 7 2017, 12:23 PM
This revision is now accepted and ready to land.Dec 7 2017, 12:23 PM
NikaWhite closed this revision.Dec 8 2017, 4:52 AM