mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
0c91339480
Some more cleanup. svn path=/trunk/; revision=659
58 lines
892 B
C
58 lines
892 B
C
/*
|
|
* DELAY.C - internal command.
|
|
*
|
|
* clone from 4nt delay command
|
|
*
|
|
* 30 Aug 1999
|
|
* started - Dr.F <dfaustus@freemail.it>
|
|
*
|
|
*
|
|
*/
|
|
|
|
#include "config.h"
|
|
|
|
#ifdef INCLUDE_CMD_DELAY
|
|
|
|
#include <tchar.h>
|
|
#include <windows.h>
|
|
#include <stdlib.h>
|
|
|
|
#include "cmd.h"
|
|
|
|
|
|
INT CommandDelay (LPTSTR cmd, LPTSTR param)
|
|
{
|
|
DWORD val;
|
|
DWORD mul=1000;
|
|
|
|
if (_tcsncmp (param, _T("/?"), 2) == 0)
|
|
{
|
|
ConOutPuts(_T(
|
|
"pause for n seconds or milliseconds"
|
|
"\n"
|
|
"DELAY [/m]n\n"
|
|
"\n"
|
|
" /m specifiy than n are milliseconds\n"
|
|
" otherwise n are seconds"));
|
|
return 0;
|
|
}
|
|
|
|
if (*param==0)
|
|
{
|
|
error_req_param_missing ();
|
|
return 1;
|
|
}
|
|
|
|
if (_tcsnicmp(param,"/m",2) == 0)
|
|
{
|
|
mul = 1;
|
|
param += 2;
|
|
}
|
|
|
|
val = atoi(param);
|
|
Sleep(val*mul);
|
|
|
|
return 0;
|
|
}
|
|
|
|
#endif /* INCLUDE_CMD_DELAY */
|