All of lore.kernel.org
 help / color / mirror / Atom feed
* [Powertop] [PATCH v3 12/15] add timestamp to html report
@ 2014-11-25 21:16 Sami Kerola
  0 siblings, 0 replies; only message in thread
From: Sami Kerola @ 2014-11-25 21:16 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 1000 bytes --]

Signed-off-by: Sami Kerola <kerolasa(a)iki.fi>
---
 src/report/report.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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(" ");
-- 
2.1.3


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-11-25 21:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-25 21:16 [Powertop] [PATCH v3 12/15] add timestamp to html report Sami Kerola

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.