1
0
cuberite-2a/src/Bindings/LuaFunctions.h
bibo38 532731e6f4 Fixed Clang 5.0 compile errors (#4085)
* Fixed Clang 5.0 compile errors

* Fixed wrong comment

* Only disable warnings in Clang 5 or higher

* Added a CMake condition for the Clang 5 no-zero-as-null-pointer-constant warning

* Now using the use_nullptr branch of the Cuberite specific SQLiteCpp fork
2017-12-21 11:36:58 +00:00

13 lines
245 B
C++

#pragma once
#include <time.h>
// tolua_begin
inline unsigned int GetTime()
{
// NB: For caveats, please see https://stackoverflow.com/a/14505248
return static_cast<unsigned int>(std::chrono::seconds(time(nullptr)).count());
}
// tolua_end