#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <stdlib.h>
int main() {
int i;
time_t tt;
for(i = 1; i <= 10; i++) {
tt = time((time_t*)0);
printf("The time is %ld\n", tt);
sleep(2);
}
exit(0);
time , gmtime , localtime, asctime, ctime, strptime, strftime. 关于这些函数,待用到的时候再详学,详查!