Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelog/stopwatch.dd
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
`std.datetime.stopwatch` is now publicly imported when you import `std.datetime`

This omission was in place since `std.datetime.stopwatch` was introduced, as
`std.datetime.stopwatch.benchmark` conflicted with `std.datetime.benchmark`.

The latter was removed in 2021 (2.075).
1 change: 1 addition & 0 deletions std/datetime/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public import std.datetime.date;
public import std.datetime.interval;
public import std.datetime.systime;
public import std.datetime.timezone;
public import std.datetime.stopwatch;

import core.exception : AssertError;
import std.functional : unaryFun;
Expand Down
24 changes: 0 additions & 24 deletions std/datetime/stopwatch.d
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,6 @@ $(TR $(TD Flags) $(TD
))
))

$(RED Unlike the other modules in std.datetime, this module is not currently
publicly imported in std.datetime.package, because the old
versions of this functionality which use
$(REF TickDuration,core,time) are in std.datetime.package and would
conflict with the symbols in this module. After the old symbols have
gone through the deprecation cycle and have been fully removed, then
this module will be publicly imported in std.datetime.package. The
old, deprecated symbols has been removed from the documentation in
December 2019 and currently scheduled to be fully removed from Phobos
after 2.094.)

So, for now, when using std.datetime.stopwatch, if other modules from
std.datetime are needed, then either import them individually rather than
importing std.datetime, or use selective or static imports to import
std.datetime.stopwatch. e.g.

----------------------------------------------------------------------------
import std.datetime;
import std.datetime.stopwatch : benchmark, StopWatch;
----------------------------------------------------------------------------

The compiler will then know to use the symbols from std.datetime.stopwatch
rather than the deprecated ones from std.datetime.package.

License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
Authors: $(HTTP jmdavisprog.com, Jonathan M Davis) and Kato Shoichi
Source: $(PHOBOSSRC std/datetime/stopwatch.d)
Expand Down
Loading