From 4f75b94c99eeb1642a5ec46144542bfcd18af934 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sun, 11 Jan 2015 01:54:18 +0000 Subject: Created new type cTickTime and rewrote cWorld::TickThread to use it --- src/Globals.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Globals.h') diff --git a/src/Globals.h b/src/Globals.h index 61f500db9..b8e9ec7ed 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -419,6 +419,8 @@ std::unique_ptr make_unique(Args&&... args) return std::unique_ptr(new T(args...)); } +// a tick is 50 ms +using cTickTime = std::chrono::duration>>; #ifndef TOLUA_TEMPLATE_BIND #define TOLUA_TEMPLATE_BIND(x) @@ -436,3 +438,4 @@ std::unique_ptr make_unique(Args&&... args) + -- cgit v1.2.3 From 2a9664d6ca8aa9eb4f554301e4d9b0ec33b465ce Mon Sep 17 00:00:00 2001 From: Tycho Date: Sun, 11 Jan 2015 21:12:26 +0000 Subject: Initial convertion of a_Dt to std::chrono also refactored cWorld::m_WorldAge and cWorld::m_TimeOfDay --- src/Globals.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Globals.h') diff --git a/src/Globals.h b/src/Globals.h index b8e9ec7ed..f0726454b 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -421,6 +421,7 @@ std::unique_ptr make_unique(Args&&... args) // a tick is 50 ms using cTickTime = std::chrono::duration>>; +using cTickTimeLong = std::chrono::duration; #ifndef TOLUA_TEMPLATE_BIND #define TOLUA_TEMPLATE_BIND(x) -- cgit v1.2.3 From a9b8a530b1e082d2ab108947ef28e0a58c8fd838 Mon Sep 17 00:00:00 2001 From: Tycho Date: Fri, 9 Jan 2015 14:07:59 +0000 Subject: Extracted Google connection test --- src/Globals.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/Globals.h') diff --git a/src/Globals.h b/src/Globals.h index f0726454b..51ddc4e79 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -298,6 +298,16 @@ void inline LOGD(const char* a_Format, ...) va_end(argList); } +void inline LOG(const char* a_Format, ...) FORMATSTRING(1, 2); + +void inline LOG(const char* a_Format, ...) +{ + va_list argList; + va_start(argList, a_Format); + vprintf(a_Format, argList); + va_end(argList); +} + #endif -- cgit v1.2.3 From bef957ef14fa6b215bd9d649c119a6cb16221248 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sun, 11 Jan 2015 10:34:50 +0100 Subject: Added newline to logged messages in the tests. --- src/Globals.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'src/Globals.h') diff --git a/src/Globals.h b/src/Globals.h index 51ddc4e79..654ede95f 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -268,43 +268,47 @@ template class SizeChecker; #include "OSSupport/StackTrace.h" #else // Logging functions -void inline LOGERROR(const char* a_Format, ...) FORMATSTRING(1, 2); +void inline LOGERROR(const char * a_Format, ...) FORMATSTRING(1, 2); -void inline LOGERROR(const char* a_Format, ...) +void inline LOGERROR(const char * a_Format, ...) { va_list argList; va_start(argList, a_Format); vprintf(a_Format, argList); + putchar('\n'); va_end(argList); } -void inline LOGWARNING(const char* a_Format, ...) FORMATSTRING(1, 2); +void inline LOGWARNING(const char * a_Format, ...) FORMATSTRING(1, 2); -void inline LOGWARNING(const char* a_Format, ...) +void inline LOGWARNING(const char * a_Format, ...) { va_list argList; va_start(argList, a_Format); vprintf(a_Format, argList); + putchar('\n'); va_end(argList); } -void inline LOGD(const char* a_Format, ...) FORMATSTRING(1, 2); +void inline LOGD(const char * a_Format, ...) FORMATSTRING(1, 2); -void inline LOGD(const char* a_Format, ...) +void inline LOGD(const char * a_Format, ...) { va_list argList; va_start(argList, a_Format); vprintf(a_Format, argList); + putchar('\n'); va_end(argList); } -void inline LOG(const char* a_Format, ...) FORMATSTRING(1, 2); +void inline LOG(const char * a_Format, ...) FORMATSTRING(1, 2); -void inline LOG(const char* a_Format, ...) +void inline LOG(const char * a_Format, ...) { va_list argList; va_start(argList, a_Format); vprintf(a_Format, argList); + putchar('\n'); va_end(argList); } -- cgit v1.2.3