Am Mon, 31 Mar 2014 05:09:22 +0000
schrieb "ed" <sillymong...@gmail.com>:

> Hi,
> 
> Just wondering what the best replacement for C timeval is in D. 
> I'm looking at std.datetime.SysTime, but std.datetime is huge so 
> I'm not sure.
> 
> Thanks,
> ed

If you just need to time something, TickDuration from
core.time is an efficient cross-platform timer.

auto t1 = TickDuration.currentSystemTick;
...
auto t2 = TickDuration.currentSystemTick;
writefln("Took %s ms", (t2-t1).msecs);

-- 
Marco

Reply via email to