-
-
Save surinoel/4990ba46bc00b1b7896c716ebbda13fd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void error_handler(long long sec, char msg1[], char msg2[]) | |
{ | |
long long curtimetick, flagtick; | |
curtimetick = clock(); | |
flagtick = curtimetick / CLOCKS_PER_SEC; | |
system("cls"); | |
printf("\n\n\n\n\n\n\n\n\n\n"); printf("\t\t\t\t\t# "); printf("%s\n", msg1); | |
printf("\t\t\t\t\t# "); printf("%lld초 안에 %s\n", sec - (clock() - curtimetick) / CLOCKS_PER_SEC, msg2); | |
while ((clock() - curtimetick) / CLOCKS_PER_SEC < sec) { | |
if (flagtick != (clock() - curtimetick) / CLOCKS_PER_SEC) { | |
flagtick = (clock() - curtimetick) / CLOCKS_PER_SEC; | |
system("cls"); | |
printf("\n\n\n\n\n\n\n\n\n\n"); printf("\t\t\t\t\t# "); printf("%s\n", msg1); | |
printf("\t\t\t\t\t# "); printf("%lld초 안에 %s\n", sec - (clock() - curtimetick) / CLOCKS_PER_SEC, msg2); | |
} | |
} | |
system("cls"); | |
return; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment