#include <xinu.h>
#include <stdio.h>
#include <string.h>
Go to the source code of this file.
◆ xsh_sleep()
shellcmd xsh_sleep |
( |
int |
nargs, |
|
|
char * |
args[] |
|
) |
| |
Definition at line 11 of file xsh_sleep.c.
References delay(), fprintf(), NULLCH, printf(), sleep(), stderr, and strncmp().
19 if (nargs == 2 &&
strncmp(args[1],
"--help", 7) == 0) {
20 printf(
"Use: %s\n\n", args[0]);
22 printf(
"\tDelay for a specified number of seconds\n");
24 printf(
"\t--help\t display this help and exit\n");
48 if ( (ch <
'0') || (ch >
'9') ) {
53 delay = 10*delay + (ch -
'0');
int32 strncmp(const char *, const char *, int32)
int32 printf(const char *,...)
int int32
符号あり32ビット整数(int)
int32 delay(int n)
マイクロ秒単位で処理を遅らせる。
int32 fprintf(int, char *,...)
#define NULLCH
NULL文字(NULL終端)