谁有时间戳倒计时的代码给我看一下。

解决方案 »

  1.   

        public static void main(String[] args) {
            for (int totalSecond = 10; totalSecond > 0; totalSecond--) {
                System.out.println(totalSecond);
                try {
                    Thread.sleep(1000);
                } catch (Exception e) {
                }
            }
        }
    不懂你说啥。
      

  2.   


    在js中我得到一个时间戳类型的。。值,想拿他和当前的时间做比较,并用来做倒计时。。不知道怎么做,在js中