Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] [OT] Displaying time and starting from zero



Darren,

Thanks for responding.

> Math.floor() means divide and round down. I think you'll get what you
> want by changing the first one to round-up:
>   var seconds = Math.ceil(elapsed/1000);
Yeah, that's done it!

I think part of the issue was not just counting from zero, but also that
there could be some milliseconds of processing time, including reading
files from servers and everything.

Using the ceiling gives enough buffer to not have to worry about
milliseconds of different.

Thanks to everyone for all the help and advice!

-- 
Dave M G


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links