Cuberite
A lightweight, fast and extensible game server for Minecraft
LuaFunctions.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <time.h>
4 // tolua_begin
5 
6 inline unsigned int GetTime()
7 {
8  // NB: For caveats, please see https://stackoverflow.com/a/14505248
9  return static_cast<unsigned int>(std::chrono::seconds(time(nullptr)).count());
10 }
11 
12 // tolua_end
unsigned int GetTime()
Definition: LuaFunctions.h:6