Commit graph

4 commits

Author SHA1 Message Date
Iain Buclaw
dd2edb247f Synchronize dmd-cxx with gdc-stable 2019-01-05 14:10:15 +01: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