Content-Type: multipart/mixed; boundary="===============1089251297389673707==" MIME-Version: 1.0 From: Sami Kerola Subject: [Powertop] [PATCH v3 12/15] add timestamp to html report Date: Tue, 25 Nov 2014 21:16:25 +0000 Message-ID: <1416950188-16616-13-git-send-email-kerolasa@iki.fi> In-Reply-To: 1416950188-16616-1-git-send-email-kerolasa@iki.fi To: powertop@lists.01.org List-ID: --===============1089251297389673707== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Signed-off-by: Sami Kerola --- 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 =3D 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 =3D new string[sys_table.rows * sys_table.cols]; system_data[0]=3D__("PowerTOP Version"); - system_data[1]=3DPOWERTOP_VERSION; + snprintf(version_date, sizeof(version_date), "%s ran at %s", POWERTOP_VER= SION, ctime(&now)); + system_data[1]=3Dversion_date; = str =3D read_sysfs_string("/proc/version"); size_t found =3D str.find(" "); -- = 2.1.3 --===============1089251297389673707==--