2012-06-14 13:06:06 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <time.h>
|
|
|
|
// tolua_begin
|
|
|
|
|
2014-05-01 21:38:35 +00:00
|
|
|
inline unsigned int GetTime()
|
2012-06-14 13:06:06 +00:00
|
|
|
{
|
2015-12-19 14:30:32 +00:00
|
|
|
// NB: For caveats, please see https://stackoverflow.com/a/14505248
|
2017-12-21 11:36:58 +00:00
|
|
|
return static_cast<unsigned int>(std::chrono::seconds(time(nullptr)).count());
|
2012-06-14 13:06:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// tolua_end
|