简体   繁体   English

java中的无限时间值?

[英]Infinity Time value in java?

is there any possible to get the infinty time value in milliseconds? 有没有可能以毫秒为单位获得无限时间值? that is i set that time delay value must be shows the window when the user close the application? 那是我设置的时间延迟值必须显示用户关闭应用程序时的窗口? any idea? 任何想法?

Your question is quite vague, but I'll try to answer it anyway. 你的问题很模糊,但无论如何我都会尽力回答。

Milliseconds are usually represented using values of type long . 毫秒通常使用long类型的值表示。 There is no way to let a long value represent infinity. 没有办法让long值代表无穷大。 However, the Long.MAX_VALUE equals 9223372036854775807, which, if interpreted as milliseconds, corresponds to 292471208 yeas . 但是, Long.MAX_VALUE等于9223372036854775807,如果解释为毫秒,则对应于292471208年 Perhaps that's long enough for you? 也许这对你来说足够长了? :-) :-)

I'm not sure I completely understand the question, but isn't Long.MAX_VALUE good enough? 我不确定我完全理解这个问题,但不是Long.MAX_VALUE足够好吗? It is equivalent to 292471208 years... 相当于292471208年......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM