From 64eaee28c243214e654c60b06a27212e8dcb5c02 Mon Sep 17 00:00:00 2001 From: Sascha Volkenandt Date: Thu, 4 Jan 2007 15:02:00 +0000 Subject: - optimized interface to access plugin objects from website - moved website code to pagelib subdirectory - introduced TimerManager that will help working on timers from a background thread --- tools.cpp | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 tools.cpp (limited to 'tools.cpp') diff --git a/tools.cpp b/tools.cpp deleted file mode 100644 index aeaba36..0000000 --- a/tools.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include -#include -#include "live.h" -#include "setup.h" -#include "tools.h" - -namespace vdrlive { - -using namespace std; - -string FormatDateTime( char const* format, time_t time ) -{ - struct tm tm_r; - if ( localtime_r( &time, &tm_r ) == 0 ) { - ostringstream builder; - builder << "cannot represent timestamp " << time << " as local time"; - throw runtime_error( builder.str() ); - } - - char result[ 256 ]; - if ( strftime( result, sizeof( result ), format, &tm_r ) == 0 ) { - ostringstream builder; - builder << "representation of timestamp " << time << " exceeds " << sizeof( result ) << " bytes"; - throw runtime_error( builder.str() ); - } - return result; -} - -} -- cgit v1.2.3