[Git][NTPsec/ntpsec][master] Use stdscr.erase() instead of clear: erase is more efficient while effectively

Matt Selsky gitlab at mg.gitlab.com
Tue Sep 24 06:53:22 UTC 2019



Matt Selsky pushed to branch master at NTPsec / ntpsec


Commits:
164df476 by Folkert van Heusden at 2019-09-24T06:52:48Z
Use stdscr.erase() instead of clear: erase is more efficient while effectively
doing the same.

https://linux.die.net/man/3/werase says:
"The clear and wclear routines are like erase and werase, but they also call
clearok, so that the screen is cleared completely on the next call to wrefresh
for that window and repainted from scratch."

- - - - -


1 changed file:

- ntpclients/ntpmon.py


Changes:

=====================================
ntpclients/ntpmon.py
=====================================
@@ -284,7 +284,7 @@ if __name__ == '__main__':
         sysvars = session.readvar(raw=True)
         with OutputContext() as ctx:
             while True:
-                stdscr.clear()
+                stdscr.erase()
                 stdscr.addstr(0, 0, u"".encode('UTF-8'))
                 if helpmode:
                     stdscr.addstr(__doc__.encode('UTF-8'))



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/164df476ab0d05473c78b49423d585636de8d125

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/164df476ab0d05473c78b49423d585636de8d125
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20190924/6b0e78b4/attachment.htm>


More information about the vc mailing list