MCPcopy Create free account
hub / github.com/JACoders/OpenJK / Com_Freeze_f

Function Com_Freeze_f

code/qcommon/common.cpp:943–961  ·  view source on GitHub ↗

============= Com_Freeze_f Just freeze in place for a given number of seconds to test error recovery ============= */

Source from the content-addressed store, hash-verified

941=============
942*/
943static void Com_Freeze_f (void) {
944 float s;
945 int start, now;
946
947 if ( Cmd_Argc() != 2 ) {
948 Com_Printf( "freeze <seconds>\n" );
949 return;
950 }
951 s = atof( Cmd_Argv(1) );
952
953 start = Com_Milliseconds();
954
955 while ( 1 ) {
956 now = Com_Milliseconds();
957 if ( ( now - start ) * 0.001 > s ) {
958 break;
959 }
960 }
961}
962
963/*
964=================

Callers

nothing calls this directly

Calls 4

Cmd_ArgcFunction · 0.70
Com_PrintfFunction · 0.70
Cmd_ArgvFunction · 0.70
Com_MillisecondsFunction · 0.70

Tested by

no test coverage detected