Commit graph

7 commits

Author SHA1 Message Date
Sebastian Wilzbach
df6365092a Replace body keyword with its replacement: do
Automatic replacement with

    sed -i "s/^\([ ]*\)body/\1do/" -i **/*.d
2017-11-20 15:33:52 +01:00
Jonathan M Davis
85704a5f6e Improve module documentation for std.datetime.stopwatch.
This should make it clearer how to deal with the problems created by
having deprecated symbols in std.datetime.package that conflict with the
ones in std.datetime.stopwatch.
2017-10-03 16:52:04 -06:00
Jonathan M Davis
9b5da5a3ca Fix the indentation on some ddoc comments. 2017-10-03 16:18:02 -06:00
Jonathan M Davis
d35c934560 Deprecate old benchmarking functions in std.datetime. 2017-10-03 16:18:02 -06:00
Vladimir Panteleev
50bdbff3fe std.datetime.stopwatch: Fix another random test failure on Win32 2017-05-17 00:13:56 +00:00
Vladimir Panteleev
6dbcf46413 std.datetime.stopwatch: Fix random test failure on Win32 2017-05-15 04:26:12 +00:00
Jonathan M Davis
ac62197c36 Add the MonoTime equivalents of std.datetime.StopWatch/benchmark.
std.datetime.package has StopWatch, benchmark, comparingBenchmark, and
measureTime, all of which use TickDuration (which would be deprecated,
but it can't be deprecated as long as those functions in std.datetime
are deprecated). This commit introduces
std.datetime.stopwatch to replace those functions in std.datetime. In
order to avoid symbol conflicts, std.datetime.stopwatch will not be
publicly import in std.datetime.package until the old symbols have been
removed.

std.datetime.experimental.stopwatch contains StopWatch and benchmark
which have essentially the same APIs as the ones in
std.datetime.package, but they use MonoTime and Duration.

comparingBenchmark has not been ported to MonoTime and Duration, because
it is simply a wrapper around benchmark.

measureTime has not been ported to MonoTime and Duration, because it is
equivalent to using StopWatch with a scope(exit) statement.

The old functionality will be deprecated the major release after the new
symbols have been introduced.
2017-05-07 10:54:25 +02:00