add sleep & date, thanks kamil

This commit is contained in:
Connor Lane Smith
2011-05-23 19:00:31 +01:00
parent 8e26716a5a
commit 474ee643ed
9 changed files with 84 additions and 5 deletions

18
sleep.c Normal file
View File

@@ -0,0 +1,18 @@
/* See LICENSE file for copyright and license details. */
#include <stdlib.h>
#include <unistd.h>
#include "util.h"
int
main(int argc, char *argv[])
{
unsigned int seconds;
if(argc != 2)
eprintf("usage: %s seconds\n", argv[0]);
seconds = atoi(argv[1]);
while((seconds = sleep(seconds)) > 0)
;
return EXIT_SUCCESS;
}