Skip to content

Instantly share code, notes, and snippets.

@Tynael
Created February 19, 2017 20:35
Show Gist options
  • Save Tynael/59b285aa6c9fdc03c2906ba1ffa0473f to your computer and use it in GitHub Desktop.
Save Tynael/59b285aa6c9fdc03c2906ba1ffa0473f to your computer and use it in GitHub Desktop.
A Simple Clock
#include<stdio.h>
#include<time.h>
#include<windows.h>
#include <stdlib.h>
int main()
{
struct tm *tmp;
time_t s;
for(;;)
{
s = time(NULL);
tmp = localtime(&t);
printf("%d:%0d:%d\n",tmp->tm_hour,tmp->tm_min,tmp->tm_sec);
Sleep(1000);
system ("cls");
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment