Message-ID: <000401be3d1a$126670a0$0fa531ce@fresita-one> From: "Jorge Ivan Meza Martinez" To: Subject: RE: Time_t stuff Date: Sun, 10 Jan 1999 21:53:20 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Reply-To: djgpp AT delorie DOT com Hello DooMWiz, I could not find a problem there, you are just printing two times the same value. >int main() >{ > time_t now; > time(&now); You give the actual time to the "now" variable > printf("Time is %d\n", now); You print the value of "now". > delay(2000); You wait 2000 milliseconds. > printf("Time is %d\n", now); You print the value of "now" variable. that never changed its value. > return 0; >} You should add a "time(&now);" before the second print for refresh the "now" value or use "printf("Time is %d\n", time(NULL));" to always retrieve the actual time. bye, Jorge Ivan Meza Martinez jimezam AT armenia DOT multi DOT net DOT co jimeza AT usa DOT net jimezam.home.ml.org ["O Lord, if there is a Lord, save my soul, if I have a soul--", Ernest Renan] -----Mensaje original----- De: DooMWiz Grupos de noticias: comp.os.msdos.djgpp Para: djgpp AT delorie DOT com Fecha: Domingo, 10 de Enero de 1999 06:01 a.m. Asunto: Time_t stuff >But the problem is that after the first time, it prompts you again for the >time. I really don't know what I should do. Thanks in advance.