[tor-commits] [nyx/master] Use controller's get_start_time() method

atagar at torproject.org atagar at torproject.org
Wed Apr 3 18:05:05 UTC 2019


commit 9835944a4fb3ab457733c3812b3fd4ba9c4bb6d1
Author: Damian Johnson <atagar at torproject.org>
Date:   Wed Apr 3 10:20:23 2019 -0700

    Use controller's get_start_time() method
    
    Tor just added a getinfo option to retrieve our uptime, so taking advantage of
    it here. As a new method naturally this is only present at the moment in the
    stem git repo.
    
    From a user perspective this should be transparent. Nyx will now present uptime
    when connected to a remote tor process and under the covers we make one fewer
    system calls, but that's about all.
---
 nyx/panel/header.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nyx/panel/header.py b/nyx/panel/header.py
index 2558b5e..370f3ee 100644
--- a/nyx/panel/header.py
+++ b/nyx/panel/header.py
@@ -277,7 +277,7 @@ class Sampling(object):
 
       'auth_type': auth_type,
       'pid': pid,
-      'start_time': stem.util.system.start_time(pid),
+      'start_time': controller.get_start_time(0),
       'fd_limit': int(controller.get_info('process/descriptor-limit', '-1')),
       'fd_used': fd_used,
 



More information about the tor-commits mailing list