Difference between System.currentTimeMillis() and Date getTime()?

前端 未结 3 2124
故里飘歌
故里飘歌 2021-02-14 03:08

I was hoping to squeeze a tiny performance gain out of many calls to a function that returns a timestamp. The function looks like this:

public static long get_n         


        
3条回答
  •  后悔当初
    2021-02-14 03:48

    No difference, and Calendar.getTimeInMillis() is also same. because the return results is the number of milliseconds since January 1, 1970, 00:00:00 GMT. you will get a same long value whereever you are all over the word.

提交回复
热议问题