#include<stdio.
h>
#include<time.h>
#include<unistd.h>
#include<stdlib.h>
int main()
{
time_t t=time(NULL);
struct tm tm=*localtime(&t);
int hour=0;
int minute=39;
int second=25;
while(1)
{
system("clear");
printf("now: %d-%02d-%02d \n", tm.tm_mday , tm.tm_mon + 1, tm.tm_year+1900);
printf("%02d:%02d:%02d",hour,minute,second);
fflush(stdout);
second++;
if(second==60)
{
minute+=1;
second=0;
}
if(minute==60)
{
hour+=1;
minute=0;
}
if(hour==24)
{
hour=0;
minute=0;
second=0;
}
sleep(1);
}
return 0;
}