digitalmars.D.learn - Out of data wiki
- Mike B Johnson (2/2) Apr 18 2017 can this be updated to work?
- Jonathan M Davis via Digitalmars-d-learn (13/15) Apr 18 2017 Wow, that's using some old stuff - stuff older than the wiki. Weird. It ...
can this be updated to work? https://wiki.dlang.org/Timing_Code
Apr 18 2017
On Tuesday, April 18, 2017 19:54:26 Mike B Johnson via Digitalmars-d-learn wrote:can this be updated to work? https://wiki.dlang.org/Timing_CodeWow, that's using some old stuff - stuff older than the wiki. Weird. It was probably ported from somewhere. The best thing to use now is core.time.MonoTime. e.g. MonoTime before = MonoTime.currTime(); ... MonoTime after = MonoTime.currTime(); Duration diff = before - after; There are also some benchmarking functions in std.datetime, but they use TickDuration (which is slated to be deprecated) and need to be replaced with versions that use MonoTime. - Jonathan M Davis
Apr 18 2017