]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
tools/kvm_stat: fix undue use of initial sleeptime
authorStefan Raspl <raspl@linux.vnet.ibm.com>
Wed, 7 Jun 2017 19:08:27 +0000 (21:08 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 8 Jun 2017 16:13:30 +0000 (18:13 +0200)
We should not use the initial sleeptime for any key press that does not
switch to a different screen, as that introduces an unaesthetic flicker due
to two updates in quick succession.

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/kvm/kvm_stat/kvm_stat

index b571584419aed4dc25256e961cbc8b8e6ed4d1bf..6e29e5b072ab2e2f92426cec6b6b5f8e954d1eab 100755 (executable)
@@ -1142,14 +1142,12 @@ class Tui(object):
                 if char == 'x':
                     self.refresh_header()
                     self.update_drilldown()
-                    sleeptime = DELAY_INITIAL
                 if char == 'q':
                     break
                 if char == 'c':
                     self.stats.fields_filter = DEFAULT_REGEX
                     self.refresh_header(0)
                     self.update_pid(0)
-                    sleeptime = DELAY_INITIAL
                 if char == 'f':
                     self.show_filter_selection()
                     sleeptime = DELAY_INITIAL
@@ -1162,7 +1160,6 @@ class Tui(object):
                 if char == 'r':
                     self.refresh_header()
                     self.stats.reset()
-                    sleeptime = DELAY_INITIAL
             except KeyboardInterrupt:
                 break
             except curses.error: