当前位置: 技术问答>java相关
有谁知道currentTimeMillis是个什么东东?
来源: 互联网 发布时间:2015-04-14
本文导语: 它的时间值是从哪儿的来的,怎么来的呢? | currentTimeMillis是java.lang.System的方法: public static long currentTimeMillis()Returns the current time in milliseconds. See the description of the class Date for a...
它的时间值是从哪儿的来的,怎么来的呢?
|
currentTimeMillis是java.lang.System的方法:
public static long currentTimeMillis()Returns the current time in milliseconds.
See the description of the class Date for a discussion of slight discrepancies that may arise between "computer time" and coordinated universal time (UTC).
Returns:
the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.
public static long currentTimeMillis()Returns the current time in milliseconds.
See the description of the class Date for a discussion of slight discrepancies that may arise between "computer time" and coordinated universal time (UTC).
Returns:
the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.
|
相当于时间戳,从1970/1/1 00:00:00以来的秒值,在java.lang.System
|
纠正楼上那位所说的错误,应当是“毫秒”值,而不是秒值,返回值是一个long型的数值。(你可以试着计算以下,long是64bit的整数,用它来记录毫秒可以表示长达500多亿年。)
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。