From d062ca940ffc6764b4072f727e3aba8ef938ca01 Mon Sep 17 00:00:00 2001 From: Adnan Hodzic Date: Thu, 4 Feb 2021 20:25:17 +0100 Subject: [PATCH] Add execution timestamp for to `--stats` --- auto_cpufreq/core.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/auto_cpufreq/core.py b/auto_cpufreq/core.py index 30c3603..14752d9 100644 --- a/auto_cpufreq/core.py +++ b/auto_cpufreq/core.py @@ -322,6 +322,13 @@ def countdown(s): if auto_cpufreq_stats_file is not None: auto_cpufreq_stats_file.seek(0) auto_cpufreq_stats_file.truncate(0) + + # execution timestamp + from datetime import datetime + now = datetime.now() + current_time = now.strftime("%B %d (%A) - %H:%M:%S") + print("\n\t\tExecuted on:", current_time) + else: run("clear")