[server] Add timeBeginPeriod

This commit is contained in:
RD42 2023-11-17 23:25:37 +08:00
parent a1ec7b149e
commit ba956da957
3 changed files with 4 additions and 0 deletions

View File

@ -290,6 +290,7 @@ int main (int argc, char** argv)
// Setup the exception handler on windows
SetUnhandledExceptionFilter(exc_handler);
timeBeginPeriod(1); // increases the accuracy of Sleep()
#endif
// Load up the plugins

View File

@ -22,6 +22,7 @@
#define SLEEP(x) { Sleep(x); }
#include <windows.h>
#include <mmsystem.h>
#include <time.h>
#else
#define SLEEP(x) { usleep(x * 1000); }

View File

@ -31,6 +31,7 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib"
OutputFile="$(OutDir)/samp-server.exe"
LinkIncremental="2"
GenerateDebugInformation="TRUE"
@ -76,6 +77,7 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib"
OutputFile="$(OutDir)/samp-server.exe"
LinkIncremental="1"
GenerateDebugInformation="TRUE"