The function time

Nasza ocena:

3
Wyświetleń: 476
Komentarze: 0
Notatek.pl

Pobierz ten dokument za darmo

Podgląd dokumentu
The function time - strona 1 The function time - strona 2

Fragment notatki:

The function time time_t time(time_t *timer);  time gives the current time, in seconds, elapsed since 00:00:00 GMT, January 1, 1970  It stores that value in the location *timer, provided that timer is not a null pointer #include #include int main() { time_t t; struct tm *newTime; t = time(NULL); printf("The number of seconds since January 1," " 1970 is %ld\n",t); newTime = localtime(&t); printf("The current time is: %s\n",asctime(newTime)); return 0; } The number of seconds since January 1, 1970 is 1262600228 The current time is: Mon Jan 4 11:17:08 2010 ... zobacz całą notatkę



Komentarze użytkowników (0)

Zaloguj się, aby dodać komentarz