Created
May 14, 2012 23:18
-
-
Save Tritlo/2698034 to your computer and use it in GitHub Desktop.
Diablo III countdown
This file contains 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
#include <stdio.h> | |
#include <time.h> | |
#ifdef __unix__ | |
int clear() | |
{ | |
system("clear"); | |
return 0; | |
} | |
#elif defined _WIN32 | |
int clear() | |
{ | |
system("cls"); | |
return 0; | |
} | |
#endif | |
int main(void) | |
{ | |
int diablo_rel = 1337065260; | |
time_t now; | |
int time_left = 1; | |
while(time_left > 0) | |
{ | |
time(&now); | |
time_left = iablo_rel-now; | |
clear(); | |
printf("%d klst, %d mín, %d sek í Diablo III\n", time_left/3600,(time_left/60) % 60 , time_left % 60); | |
sleep(1); | |
} | |
clear(); | |
printf("Diablo III er kominn út!"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment