• 时间毫秒的作用


    package com.ithei.DateTimeDemo;
    
    /**
     * @program: javaDemo01->DemoTime
     * @description: 时间毫秒的使用场景
     * @author: 安生
     * @create: 2021-01-22 13:36
     **/
    
    
    import java.util.Date;
    
    /**
       时间毫秒的作用
          常见使用场景
     */
    public class DemoTime {
    
        /**
          因为 Date对象的值不适合用于计算 但是时间毫秒适合
         * @param args
         */
        public static void main(String[] args) {
    
            //时间的开始
            long startTime = new Date().getTime();
            for (int i = 0; i < 1000000; i++){
                System.out.println("输出:"+i);
            }
            //时间的结束
            long endTime = new Date().getTime();
            System.out.println( (endTime-startTime) / 1000.0 + "s" );
        }
    
    }
  • 相关阅读:
    jenkins--部署项目
    jenkins--创建项目
    jenkins--安全配置
    jenkins--工具配置
    jenkins--系统配置
    11.17
    11.14
    11.13
    dfs
    10.31
  • 原文地址:https://www.cnblogs.com/bichen-01/p/14312848.html
Copyright © 2020-2023  润新知