为什么我会得到科学记数法

时间:2018-01-30 18:30:32

标签: spring-boot log4j

为什么我会得到科学记数法

我想在几秒钟内记录生成的方法输出时间,如下所示

logger.info("JPA   "+ numberOfTest +"X test findProductByProductName               "+ (double) timeCounter.avarageTimeJPAFindProductByProductName(numberOfTest,"Chai")/1000000000.0d);
logger.info("JDBC  "+ numberOfTest +"X test findProductByProductName               "+ (double) timeCounter.avarageTimeJDBCFindProductByProductName(numberOfTest,"Chai")/1000000000.0d);

但是在输出中,我只能在timeCounter.avarageTimeJDBCFindProductByProductName(numberOfTest,"Chai")/1000000000.0d看到科学记数法的结果?

enter image description here

我不知道为什么?你能为我提供以给定格式记录时间的最佳方式,例如以秒为单位吗?我用于记录org.apache.log4j.Logger;

0 个答案:

没有答案
相关问题