update time_object to get_time_object

This commit is contained in:
Andrew Case
2018-12-08 17:34:48 +00:00
committed by ikelos
parent 0e7b6b6702
commit 8705fb3047
2 changed files with 2 additions and 2 deletions
@@ -40,7 +40,7 @@ class hist_entry(objects.Struct):
# Convert the string into an integer (number of seconds)
return int(time_string)
def time_object(self):
def get_time_object(self):
nsecs = self.time_as_integer
# Build a timestamp object from the integer
return utility.unixtime_to_datetime(nsecs)
+1 -1
View File
@@ -68,7 +68,7 @@ class Bash(plugins.PluginInterface):
history_entries.append(hist)
for hist in sorted(history_entries, key = attrgetter('time_as_integer')):
yield (0, (task.pid, task_name, hist.time_object(), hist.get_command()))
yield (0, (task.pid, task_name, hist.get_time_object(), hist.get_command()))
def run(self):
filter = pslist.PsList.create_filter([self.config.get('pid', None)])