2006-02-16 23:23:37 +00:00
|
|
|
/*
|
|
|
|
* DELAY.C - internal command.
|
|
|
|
*
|
|
|
|
* clone from 4nt delay command
|
|
|
|
*
|
|
|
|
* 30 Aug 1999
|
|
|
|
* started - Paolo Pantaleo <paolopan@freemail.it>
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2013-01-24 23:00:42 +00:00
|
|
|
#include "precomp.h"
|
2006-02-16 23:23:37 +00:00
|
|
|
|
|
|
|
#ifdef INCLUDE_CMD_DELAY
|
|
|
|
|
|
|
|
|
2008-08-25 23:22:03 +00:00
|
|
|
INT CommandDelay (LPTSTR param)
|
2006-02-16 23:23:37 +00:00
|
|
|
{
|
2013-06-30 00:08:43 +00:00
|
|
|
DWORD val;
|
|
|
|
DWORD mul=1000;
|
2006-02-16 23:23:37 +00:00
|
|
|
|
2013-06-30 00:08:43 +00:00
|
|
|
if (_tcsncmp (param, _T("/?"), 2) == 0)
|
|
|
|
{
|
|
|
|
ConOutResPaging(TRUE,STRING_DELAY_HELP);
|
|
|
|
return 0;
|
|
|
|
}
|
2006-02-16 23:23:37 +00:00
|
|
|
|
2013-06-30 00:08:43 +00:00
|
|
|
nErrorLevel = 0;
|
2006-02-16 23:23:37 +00:00
|
|
|
|
2013-06-30 00:08:43 +00:00
|
|
|
if (*param==0)
|
|
|
|
{
|
|
|
|
error_req_param_missing ();
|
|
|
|
return 1;
|
|
|
|
}
|
2006-02-16 23:23:37 +00:00
|
|
|
|
2013-06-30 00:08:43 +00:00
|
|
|
if (_tcsnicmp(param,_T("/m"),2) == 0)
|
|
|
|
{
|
|
|
|
mul = 1;
|
|
|
|
param += 2;
|
|
|
|
}
|
2006-02-16 23:23:37 +00:00
|
|
|
|
2013-06-30 00:08:43 +00:00
|
|
|
val = _ttoi(param);
|
|
|
|
Sleep(val * mul);
|
2006-02-16 23:23:37 +00:00
|
|
|
|
2013-06-30 00:08:43 +00:00
|
|
|
return 0;
|
2006-02-16 23:23:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* INCLUDE_CMD_DELAY */
|