Mercurial Hosting > quicktimer
changeset 2:0dbfb504309e
Finished program
author | VilyaemKenyaz |
---|---|
date | Wed, 26 Jul 2023 03:46:13 -0400 |
parents | 5725e5313328 |
children | bdd83d6807d5 |
files | quicktimer quicktimer.c |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/quicktimer.c Wed Jul 26 03:18:00 2023 -0400 +++ b/quicktimer.c Wed Jul 26 03:46:13 2023 -0400 @@ -17,17 +17,17 @@ printf("Quicktimer does not have access to the time, clock_t clock is -1!\n"); return 2; } -unsigned int timeleft = 60; //argv[1]; +unsigned int timeleft = atoi(argv[1]); printf("Starting Quicktimer Ctrl-C to stop. Time left %d \n", timeleft); while (timeleft != 0){ timeleft -= 1; //clock()/CLOCKS_PER_SEC; printf("Time left: %d\n", timeleft); -system("sleep 1"); // LORD! +//system("sleep 1"); // LORD! +sleep(1); } -printf("%d\n",&timeleft); printf("Timer has finished, enjoy your day. Glory to the Father, the Son, and the Holy Spirit\n"); }