Calendar.getInstance().getTimeInMillis() 这种方式速度最慢,看看源码会发现,Canlendar因为要处理时区问题会耗费很多的时间。
所以建议多使用第一种方式。
另,System 类中有很多高效的方法,比如,arrayCopy 之类的
Java获取时间戳
原文:https://www.cnblogs.com/zkaiw/p/12712735.html