diff options
| author | Giampaolo Rodola' <g.rodola@gmail.com> | 2013-12-07 16:32:38 +0100 |
|---|---|---|
| committer | Giampaolo Rodola' <g.rodola@gmail.com> | 2013-12-07 16:32:38 +0100 |
| commit | 8ae286e470478fc65d539576fa2746db72f4257f (patch) | |
| tree | 1187326c74c2cdf45c9ac25bb585175a81672153 /examples | |
| parent | cd9a91d695bd9d3442ea16831bcd5e6d4f51a4c3 (diff) | |
| download | psutil-8ae286e470478fc65d539576fa2746db72f4257f.tar.gz | |
issue 451: deprecate BOOT_TIME constant
Diffstat (limited to 'examples')
| -rwxr-xr-x | examples/top.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/top.py b/examples/top.py index 8049694c..afc13678 100755 --- a/examples/top.py +++ b/examples/top.py @@ -138,7 +138,7 @@ def print_header(procs_status, num_procs): st.sort(key=lambda x: x[:3] in ('run', 'sle'), reverse=1) print_line(" Processes: %s (%s)" % (num_procs, ' '.join(st))) # load average, uptime - uptime = datetime.now() - datetime.fromtimestamp(psutil.BOOT_TIME) + uptime = datetime.now() - datetime.fromtimestamp(psutil.get_boot_time()) av1, av2, av3 = os.getloadavg() line = " Load average: %.2f %.2f %.2f Uptime: %s" \ % (av1, av2, av3, str(uptime).split('.')[0]) |
