diff --git a/CMakeSettings.json b/CMakeSettings.json index 441c9d43..c0b2ed35 100644 --- a/CMakeSettings.json +++ b/CMakeSettings.json @@ -1,37 +1,37 @@ { - // See https://go.microsoft.com//fwlink//?linkid=834763 for more information about this file. - "configurations": [ - { - "name": "x86-Debug", - "generator": "Visual Studio 14 2015", - "configurationType" : "Debug", - "buildRoot": "${env.LOCALAPPDATA}\\CMakeBuild\\${workspaceHash}\\build\\${name}", - "cmakeCommandArgs": "", - "buildCommandArgs": "-m -v:minimal" - }, - { - "name": "x86-Release", - "generator": "Visual Studio 14 2015", - "configurationType": "Release", - "buildRoot": "${env.LOCALAPPDATA}\\CMakeBuild\\${workspaceHash}\\build\\${name}", - "cmakeCommandArgs": "", - "buildCommandArgs": "-m -v:minimal" - }, - { - "name": "x64-Debug", - "generator": "Visual Studio 14 2015 Win64", - "configurationType" : "Debug", - "buildRoot": "${env.LOCALAPPDATA}\\CMakeBuild\\${workspaceHash}\\build\\${name}", - "cmakeCommandArgs": "", - "buildCommandArgs": "-m -v:minimal" - }, - { - "name": "x64-Release", - "generator": "Visual Studio 14 2015 Win64", - "configurationType": "Release", - "buildRoot": "${env.LOCALAPPDATA}\\CMakeBuild\\${workspaceHash}\\build\\${name}", - "cmakeCommandArgs": "", - "buildCommandArgs": "-m -v:minimal" - } - ] -} \ No newline at end of file + // See https://go.microsoft.com//fwlink//?linkid=834763 for more information about this file. + "configurations": [ + { + "name": "x86-Debug", + "generator": "Visual Studio 14 2015", + "configurationType": "Debug", + "buildRoot": "${env.USERPROFILE}\\CMakeBuild\\${workspaceHash}\\build\\${name}", + "cmakeCommandArgs": "", + "buildCommandArgs": "-m -v:minimal" + }, + { + "name": "x86-Release", + "generator": "Visual Studio 14 2015", + "configurationType": "Release", + "buildRoot": "${env.USERPROFILE}\\CMakeBuild\\${workspaceHash}\\build\\${name}", + "cmakeCommandArgs": "", + "buildCommandArgs": "-m -v:minimal" + }, + { + "name": "x64-Debug", + "generator": "Visual Studio 14 2015 Win64", + "configurationType": "Debug", + "buildRoot": "${env.USERPROFILE}\\CMakeBuild\\${workspaceHash}\\build\\${name}", + "cmakeCommandArgs": "", + "buildCommandArgs": "-m -v:minimal" + }, + { + "name": "x64-Release", + "generator": "Visual Studio 14 2015 Win64", + "configurationType": "Release", + "buildRoot": "${env.USERPROFILE}\\CMakeBuild\\${workspaceHash}\\build\\${name}", + "cmakeCommandArgs": "", + "buildCommandArgs": "-m -v:minimal" + } + ] +} diff --git a/src/servers/Server_Common/Util.cpp b/src/servers/Server_Common/Util.cpp index f46c68cc..2d7a6a41 100644 --- a/src/servers/Server_Common/Util.cpp +++ b/src/servers/Server_Common/Util.cpp @@ -23,6 +23,13 @@ uint64_t Core::Util::getTimeMs() 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() { std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now(); diff --git a/src/servers/Server_Common/Util.h b/src/servers/Server_Common/Util.h index 4aa19c7e..306b3d94 100644 --- a/src/servers/Server_Common/Util.h +++ b/src/servers/Server_Common/Util.h @@ -11,6 +11,8 @@ std::string binaryToHexString( uint8_t* pBinData, uint16_t size ); uint64_t getTimeMs(); +uint64_t getTimeSeconds(); + uint64_t getEorzeanTimeStamp(); void valueToFlagByteIndexValue( uint32_t inVal, uint8_t& outVal, uint16_t& outIndex );