From ba8c2aa7e439a4a721739464097439ecb2f531f6 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Thu, 15 Jan 2009 06:48:15 +0000 Subject: nakee's work on dolphin events. Also get wxw out of logmanager. This commit wants your comments git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1875 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/Timer.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'Source/Core/Common/Src/Timer.cpp') diff --git a/Source/Core/Common/Src/Timer.cpp b/Source/Core/Common/Src/Timer.cpp index 3ecd15b11a..270a339a70 100644 --- a/Source/Core/Common/Src/Timer.cpp +++ b/Source/Core/Common/Src/Timer.cpp @@ -20,21 +20,18 @@ #endif #include +#include #include "Common.h" #include "Timer.h" #ifdef __GNUC__ -#include - u32 timeGetTime() { struct timeb t; ftime(&t); return((u32)(t.time * 1000 + t.millitm)); } - - #endif @@ -88,7 +85,6 @@ void _time64(u64* t) #endif - u64 Timer::GetTimeSinceJan1970(void) { time_t ltime; @@ -108,4 +104,14 @@ u64 Timer::GetLocalTimeSinceJan1970(void) return (u64)(sysTime + tzDiff); } + +std::string Timer::GetTimeFormatted(void) +{ + struct timeb tp; + (void)::ftime(&tp); + char temp[32]; + sprintf(temp, "%02hi:%02i:%03i", tp.time/60, tp.time%60, tp.millitm); + + return std::string(temp); +} } // end of namespace Common -- cgit v1.2.3