]> git.xolatile.top Git - soikk-clock.git/commitdiff
Update clock.c
authorSoikk <76824648+Soikk@users.noreply.github.com>
Fri, 10 Sep 2021 09:04:10 +0000 (11:04 +0200)
committerSoikk <76824648+Soikk@users.noreply.github.com>
Fri, 10 Sep 2021 09:04:10 +0000 (11:04 +0200)
Added a delay so it doesnt use so much CPU

clock.c

diff --git a/clock.c b/clock.c
index feb013e26a828cbedc1abba714f6173b01751644..c2f0ab5041303810eb6d2bbdbf8fd31c1df6ab4c 100644 (file)
--- a/clock.c
+++ b/clock.c
@@ -268,6 +268,11 @@ int main(int argc, char **argv){
                struct tm *curr_time = localtime(&rawtime);
                gotoxy(0, 0);
                drawTime(curr_time);
+               #ifdef _WIN32
+               Sleep(125);
+               #else
+               sleep(.125);
+               #endif
        }
 
        return 0;