Test kernel compiler for -iquote instead of target compiler script that
[tangerine.git] / workbench / c / Delay.c
blob1678486d0429a46e5b0f9a2f7f5f49c168b9958a
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Delay CLI command.
6 Lang: english
7 */
9 /******************************************************************************
12 NAME
14 Delay (n) [TICK | TICKS]
16 SYNOPSIS
18 TIME/N,TICK=TICKS/S
20 LOCATION
22 Sys:C
24 FUNCTION
26 Wait a certain amount of ticks clock (1/50 of a second).
28 INPUTS
30 TICK=TICKS -- time unit in ticks to wait for.
31 RESULT
33 NOTES
34 An arbitrary limit is set to 15000 ticks to wait for.
36 EXAMPLE
38 BUGS
40 SEE ALSO
42 INTERNALS
44 ******************************************************************************/
46 #include <dos/dos.h>
47 #include <proto/dos.h>
48 #include <proto/exec.h>
50 int __nocommandline;
52 int main(void)
54 IPTR args[1] = { 0 };
55 struct RDArgs *rda = ReadArgs("TIME/N,TICK=TICKS/S", args, NULL);
57 if (rda)
59 LONG ticks = *((LONG *)args[0]);
61 if (ticks >= 0 && ticks <= TICKS_PER_SECOND * 300)
63 Delay(ticks);
64 return RETURN_OK;
67 return RETURN_FAIL;