java时间差
以下代码没什么意义,只是记录
long mstart = System.nanoTime();
int mIndex = 0 ;
for (int i = 0; i < 100000000; i++) {
mIndex = i ;
if ( mIndex >= 0 ){
}
}
long mend = System.nanoTime();
for (int i = 0; i < 100000000; i++) {
mIndex = i ;
if ( mIndex > -1 ){
}
}
long mend_o = System.nanoTime();
BigDecimal diff = BigDecimal.valueOf(mend-mstart,5);
BigDecimal diff_o = BigDecimal.valueOf(mend_o-mend,5);