给定时间戳倒时计 private static void time1() { 79 while (time > 0) { 80 time--; 81 try { 82 Thread.sleep(1000); 83 int hh = time / 60 / 60 % 60; 84 int mm = time / 60 % 60; 85 int ss = time % 60; 86 System.out.println("还剩" + hh + "小时" + mm + "分钟" + ss + "秒"); 87 } catch (InterruptedException e) { 88 e.printStackTrace(); 89 } 90 } 91
倒计时
最新推荐文章于 2024-09-24 08:00:00 发布