Howto (Time hande in gcc)

Alexios Chouchoulas alexios at vennea.demon.co.uk
Tue Apr 1 02:17:29 EEST 1997


>  Loipon (prospa8w edw kai ligo kairw na ma8w C h gcc ) exw ena problhma!
>  8elw na diabasw thn wra se programma C pou 8a elegxei mia syskebh katw
>  apo linux  alla den 3erw pws, brhka mia synarthsh (thn gettimeofday)
>  alla den 3erw ti parametrous 8elei kai ti typou eina oi parammetroi

  Xaire.

  Ta alla paidia edwsan hdh dyo protaseis pou aforousan thn time(2). Se
periptwsh pou theleis thn wra kommatiasmenh se pedia (etos, mhnas, hmera,
wra, lepto, defterolepto, klp klp), mporeis na xrhsimopoihseis to ekshs:

#include <time.h>

{
  struct tm *dt;
  time_t t;

  t=time(NULL);
  dt=localtime(&t);
}

  Des to man page ths localtime(3) gia na deis ti akribws periexei ena
time_t.


Alexios Chouchoulas          '88    ,88'   ,88'     alexios at vennea.demon.co.uk
The Unpronouncable One      ,o88oooo88ooooo88oo,              axc at dcs.ed.ac.uk

==================================================================
For help on using this list (linux-greek-users), send a message to
"majordomo at argeas.argos.hol.gr" with one line of text: "help".
For any problem send e-mail to owner-linux-greek-users
==================================================================



More information about the Linux-greek-users mailing list