diff options
author | Sami Kerola <kerolasa@iki.fi> | 2014-11-25 21:16:25 +0000 |
---|---|---|
committer | Alexandra Yates <alexandra.yates@linux.intel.com> | 2014-11-25 15:01:52 -0800 |
commit | 53fcdf8e2ebc39b6a492cdf02a35ab64e538bb29 (patch) | |
tree | 0c453bfb810dda4d591c250fc214fefbeee74c4b | |
parent | b8ce814394ca73afb6f3c962c4e47112024b108d (diff) | |
download | powertop-2.0-53fcdf8e2ebc39b6a492cdf02a35ab64e538bb29.tar.gz |
add timestamp to html report
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
-rw-r--r-- | src/report/report.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/report/report.cpp b/src/report/report.cpp index 981e984..cd3c961 100644 --- a/src/report/report.cpp +++ b/src/report/report.cpp @@ -101,6 +101,8 @@ static string read_os_release(const string &filename) static void system_info(void) { string str; + char version_date[64]; + time_t now = time(NULL); /* div attr css_class and css_id */ tag_attr div_attr; @@ -117,7 +119,8 @@ static void system_info(void) /* Set array of data in row Major order */ string *system_data = new string[sys_table.rows * sys_table.cols]; system_data[0]=__("PowerTOP Version"); - system_data[1]=POWERTOP_VERSION; + snprintf(version_date, sizeof(version_date), "%s ran at %s", POWERTOP_VERSION, ctime(&now)); + system_data[1]=version_date; str = read_sysfs_string("/proc/version"); size_t found = str.find(" "); |