mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-25 22:17:45 +00:00
Merge pull request #54 from Minoost/master
Add Core::Util::getTimeSeconds()
This commit is contained in:
commit
4fe030d90d
2 changed files with 9 additions and 0 deletions
|
@ -23,6 +23,13 @@ uint64_t Core::Util::getTimeMs()
|
||||||
return now_ms;
|
return now_ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint64_t Core::Util::getTimeSeconds()
|
||||||
|
{
|
||||||
|
std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now();
|
||||||
|
auto now = std::chrono::time_point_cast< std::chrono::seconds >( t1 ).time_since_epoch().count();
|
||||||
|
return now;
|
||||||
|
}
|
||||||
|
|
||||||
uint64_t Core::Util::getEorzeanTimeStamp()
|
uint64_t Core::Util::getEorzeanTimeStamp()
|
||||||
{
|
{
|
||||||
std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now();
|
std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now();
|
||||||
|
|
|
@ -11,6 +11,8 @@ std::string binaryToHexString( uint8_t* pBinData, uint16_t size );
|
||||||
|
|
||||||
uint64_t getTimeMs();
|
uint64_t getTimeMs();
|
||||||
|
|
||||||
|
uint64_t getTimeSeconds();
|
||||||
|
|
||||||
uint64_t getEorzeanTimeStamp();
|
uint64_t getEorzeanTimeStamp();
|
||||||
|
|
||||||
void valueToFlagByteIndexValue( uint32_t inVal, uint8_t& outVal, uint16_t& outIndex );
|
void valueToFlagByteIndexValue( uint32_t inVal, uint8_t& outVal, uint16_t& outIndex );
|
||||||
|
|
Loading…
Add table
Reference in a new issue