532731e6f4
* 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
13 lines
245 B
C++
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
|