简体   繁体   中英

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 . There is no way to let a long value represent infinity. However, the Long.MAX_VALUE equals 9223372036854775807, which, if interpreted as milliseconds, corresponds to 292471208 yeas . Perhaps that's long enough for you? :-)

I'm not sure I completely understand the question, but isn't Long.MAX_VALUE good enough? It is equivalent to 292471208 years...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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