javascript setTimeout()...

They have: 2 posts

Joined: Mar 2006

Hai,

Could anyone tell me how to get exact number of seconds to have the in the interval in the setTimeOut() method.Since the interval should be in milliseconds I gave it as 1000 to get a delay of 1sec but it is taking more time than 1second.
So could you tell me how to get exact number seconds and it's calculation.
PLease this an Urgent issue..

Thanking you,
-Kalyan.

Busy's picture

He has: 6,151 posts

Joined: May 2001

I think it's 60 for a second, 60x60 for a minute

They have: 2 posts

Joined: Mar 2006

Hai,

Some hours ago i posted a message "Regarding the time interval in javascript".My actual problem is the delay of time in execution, the loopin which is present is actually taking alot of time.So could any post a program for countdowntimer in javascript. This has to by taking the date from the user.

Thanking you,
-nectarsol.

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

Merged threads.

Yes, 1000 milliseconds is 1 second. Depending on the hardware and environment, you can expect a reasonable difference in actual time, and this is usually negligible. So it sounds like your code's having trouble elsewhere.

Can you post it or link to it so we can try to see the problem? Smiling

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.