JiafanZhou
版主
发贴: 736
积分: 61
|
于 2008-12-08 19:47
Unfortunately, using Date class in Java is not accurate. You should replace them with the System.currentTimeMillis() method instead.
Thus, [cmd] int beginTime = System.currentTimeMillis(); ... int endTime = System.currentTimeMillis();
long costTime = endTime - beginTime; // the metric is millisecond. [/cmd]
Regards, Jiafan
When I was a kid I used to pray every night for a new bike. Then I realized that The Lord doesn't work that way, so I stole one and asked him to forgive me.
|