commit 08bc7e50b85b28d1a0a2232ceb3d31588906537f
Author: Jan Tluka <jtluka(a)redhat.com>
Date: Wed Sep 3 16:30:39 2014 +0200
Common: add variable to store the time when a command started
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst/Common/NetTestCommand.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/lnst/Common/NetTestCommand.py b/lnst/Common/NetTestCommand.py
index fbb15a2..6b6db0b 100644
--- a/lnst/Common/NetTestCommand.py
+++ b/lnst/Common/NetTestCommand.py
@@ -18,6 +18,7 @@ import imp
import pickle, traceback
import multiprocessing
import re
+from time import time
from lnst.Common.ExecCmd import exec_cmd, ExecCmdFail
from lnst.Common.ConnectionHandler import recv_data, send_data
@@ -94,6 +95,7 @@ class NetTestCommand:
self._control_cmd= None
self._result = None
self._log_ctl = log_ctl
+ self._start_time = None
if "bg_id" not in self._command:
self._id = None
@@ -110,6 +112,7 @@ class NetTestCommand:
return self._finished
def run(self):
+ self._start_time = time()
if isinstance(self._cmd_cls, NetTestCommandControl) or \
isinstance(self._cmd_cls, NetTestCommandConfig):
return self._cmd_cls.run()
Show replies by date