Lokaltog/powerline — pull request #403 by ZyX-I (2013-04-07 15:13:35+00:00)
Title: Threaded cpu load percent

Current state should be replaced for the following reasons:

`interval=0.5` means that it will block for 0.5 seconds which is bad. With
threading it blocks only the separate thread, and it does not hold
GIL (uses regular time.sleep to wait) in this case which is fine.

`interval=0.05` means that it will report almost random value.

`interval=None` means that (assuming psutil.cpu_percent is called only by this
segment) it will report CPU load percent measured between two
subsequent .cpu_load_percent calls or cpu_load_percent call and
module import. It is used for update method to get immediate
result in case update_first is True. Cannot be used not in separate thread because it is just as good as `interval=0.05` at returning random values in case interval is interval between `.render()` calls.