当前位置:网站首页>Simple use of timeunit

Simple use of timeunit

2022-07-05 07:20:00 Sun Tianyang

The usual time
1.TimeUnit.DAYS // God
2.TimeUnit.HOURS // Hours
3.TimeUnit.MINUTES // minute
4.TimeUnit.SECONDS // second
5.TimeUnit.IlliSECONDS // millisecond
Time shift
1.public long toMillis(long d) // Convert to MS
2.public long toSeconds(long d) // Convert to seconds
3.public long toMinutes(long d) // transformational component
4.public long toHours(long d) // Convert to hours
5.public long toDays(long d) // Convert to day
Get system time
System.current.TimrMills();
Thread sleep 5 Second
TimeUnit.SECONDS.sleep(5)

原网站

版权声明
本文为[Sun Tianyang]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140557104464.html