Thread View: es.comp.os.linux.programacion
2 messages
2 total messages
Started by teoria
Sun, 03 Sep 2006 19:03
como obtener la hora de mi sistema en C
Author: teoria
Date: Sun, 03 Sep 2006 19:03
Date: Sun, 03 Sep 2006 19:03
8 lines
1589 bytes
1589 bytes
Hola señores. Estoy haciendo un programa en C y necesito imprimir en pantalla la hora y fecha de cuando el sistema fue iniciado. Hay alguna función que me retorne eso? Tambien necesito imprimir la hora actual en pantalla. Se me ocurrió que si tenia la hora actual, restandole los segundos de cuando fue iniciado el sistema, podia obtener la hora de cuando se inicio el sistema. Pero no me sale. Necesito ayuda! Saludos!
Re: como obtener la hora de mi sistema en C
Author: Pascal Bourguignon
Date: Sun, 03 Sep 2006 21:51
Date: Sun, 03 Sep 2006 21:51
19 lines
2094 bytes
2094 bytes
"teoria" <teoriaderedes@gmail.com> writes: > Hola se�ores. Estoy haciendo un programa en C y necesito imprimir en > pantalla la hora y fecha de cuando el sistema fue iniciado. Hay alguna > funci�n que me retorne eso? > Tambien necesito imprimir la hora actual en pantalla. > Se me ocurri� que si tenia la hora actual, restandole los segundos de > cuando fue iniciado el sistema, podia obtener la hora de cuando se > inicio el sistema. Pero no me sale. Necesito ayuda! > Saludos! date(1), uptime(1), time(2), gettimeofday(2), etc... -- __Pascal Bourguignon__ http://www.informatimago.com/ "Remember, Information is not knowledge; Knowledge is not Wisdom; Wisdom is not truth; Truth is not beauty; Beauty is not love; Love is not music; Music is the best." -- Frank Zappa
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads