System.currentTimeMillis() should return milliseconds hnsecs instead of hnsecs.
Opened this issue · 1 comments
jmcabo commented
I realized while porting a small benchmark both in java and D that there was something strange in System.currentTimeMillis(). It is returning hecto nano seconds in the phobos implementation:
static long currentTimeMillis(){
version(Tango) return tango.time.Clock.Clock.now().ticks() / 10000;
else return std.datetime.Clock.currStdTime();
}
The fix is to divide by 10000, as in the tango version:
static long currentTimeMillis(){
version(Tango) return tango.time.Clock.Clock.now().ticks() / 10000;
else return std.datetime.Clock.currStdTime() / 10000;
}
jacob-carlborg commented
Could you please make a pull request out of that commit?