From 824c246d2f8f8bc825f251385f5084b58256cb59 Mon Sep 17 00:00:00 2001 From: dooglus Date: Sun, 28 Oct 2007 16:19:24 +0000 Subject: [PATCH] Show the current time in info, warning, and error messages. git-svn-id: http://svn.voria.com/code@995 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/main.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/synfig-core/trunk/src/synfig/main.cpp b/synfig-core/trunk/src/synfig/main.cpp index a911a48..2c5be13 100644 --- a/synfig-core/trunk/src/synfig/main.cpp +++ b/synfig-core/trunk/src/synfig/main.cpp @@ -389,6 +389,19 @@ synfig::Main::~Main() #endif } +static const String +current_time() +{ + const int buflen = 50; + time_t t; + struct tm *lt; + char b[buflen]; + time(&t); + lt = localtime(&t); + strftime(b, buflen, " [%X] ", lt); + return String(b); +} + void synfig::error(const char *format,...) { @@ -401,7 +414,7 @@ void synfig::error(const String &str) { static Mutex mutex; Mutex::Lock lock(mutex); - cerr<<"synfig("<