X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=sys.h;h=9dfdf620c91c9899d26a139272cdc038f86f1b58;hb=953f1f8feaa55e272118605371c13bf0f68585da;hp=37fcc8044fb87051d91eb7cfbd3e3715f7bfe2c1;hpb=43ccc403e08b7b72eb687f2d3700e14ea078d30a;p=xonotic%2Fdarkplaces.git diff --git a/sys.h b/sys.h index 37fcc804..9dfdf620 100644 --- a/sys.h +++ b/sys.h @@ -68,10 +68,11 @@ char *Sys_TimeString(const char *timeformat); // /// an error will cause the entire program to exit -void Sys_Error (const char *error, ...) DP_FUNC_PRINTF(1); +void Sys_Error (const char *error, ...) DP_FUNC_PRINTF(1) DP_FUNC_NORETURN; /// (may) output text to terminal which launched program void Sys_PrintToTerminal(const char *text); +void Sys_PrintfToTerminal(const char *fmt, ...); /// INFO: This is only called by Host_Shutdown so we dont need testing for recursion void Sys_Shutdown (void); @@ -82,9 +83,19 @@ void Sys_Quit (int returnvalue); * profiling to certain areas of the code, such as ingame performance without * regard for loading/shutdown performance (-profilegameonly on commandline) */ +#ifdef __cplusplus +extern "C" +#endif void Sys_AllowProfiling (qboolean enable); -double Sys_DoubleTime (void); +typedef struct sys_cleantime_s +{ + double dirtytime; // last value gotten from Sys_DirtyTime() + double cleantime; // sanitized linearly increasing time since app start +} +sys_cleantime_t; + +double Sys_DirtyTime(void); void Sys_ProvideSelfFD (void); @@ -102,5 +113,10 @@ extern qboolean sys_supportsdlgetticks; unsigned int Sys_SDL_GetTicks (void); // wrapper to call SDL_GetTicks void Sys_SDL_Delay (unsigned int milliseconds); // wrapper to call SDL_Delay +/// called to set process priority for dedicated servers +void Sys_InitProcessNice (void); +void Sys_MakeProcessNice (void); +void Sys_MakeProcessMean (void); + #endif