java - Division of numbers -


i see in timestamp class, constructor goes like:

    public timestamp(long time) {     super((time/1000)*1000);     .................... 

what im not understanding is, need of dividing time 1000 , multiplying again 1000. difference make? isn't piece redundant?

that's way of truncating next lower multiple of 1000 milliseconds -- i.e., whole second. it's not best way, it's way.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -