diff options
author | drumsetmonkey <abelleisle@roadrunner.com> | 2015-12-16 07:35:55 -0500 |
---|---|---|
committer | drumsetmonkey <abelleisle@roadrunner.com> | 2015-12-16 07:35:55 -0500 |
commit | 983602c87add7161cc82311e690e066f96493c31 (patch) | |
tree | 3c4f3bb9eb440e6d78360291138c68c7faa86388 /src/common.cpp | |
parent | bf82dd59140d32f4eb265ae69a44784b5fda116a (diff) | |
parent | 2286361ea87b42e73ec2f544265c5fd5e1b5713b (diff) |
Stuff
Diffstat (limited to 'src/common.cpp')
-rw-r--r-- | src/common.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/common.cpp b/src/common.cpp index a8a964e..7449a35 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -1,7 +1,15 @@ #include <common.h> #include <cstdio> +#include <chrono> -#define DEBUG +#ifndef __WIN32__ + +unsigned int millis(void){ + std::chrono::system_clock::time_point now=std::chrono::system_clock::now(); + return std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch()).count(); +} + +#endif // __WIN32__ void DEBUG_prints(const char* file, int line, const char *s,...){ va_list args; |