diff options
| author | Shawn Hoffman <godisgovernment@gmail.com> | 2009-01-15 06:48:15 +0000 |
|---|---|---|
| committer | Shawn Hoffman <godisgovernment@gmail.com> | 2009-01-15 06:48:15 +0000 |
| commit | ba8c2aa7e439a4a721739464097439ecb2f531f6 (patch) | |
| tree | 156956d0ae06c4c1b9eb34d8548c9230e929eac8 /Source/Core/Common/Src/Timer.cpp | |
| parent | aced3c00fdb83dd2ce6b6ec213b4f4afc9b4fdfb (diff) | |
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
Diffstat (limited to 'Source/Core/Common/Src/Timer.cpp')
| -rw-r--r-- | Source/Core/Common/Src/Timer.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
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 <time.h> +#include <sys/timeb.h> #include "Common.h" #include "Timer.h" #ifdef __GNUC__ -#include <sys/timeb.h> - 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 |
