diff --git a/changelog/stopwatch.dd b/changelog/stopwatch.dd new file mode 100644 index 00000000000..00ac7b09e0c --- /dev/null +++ b/changelog/stopwatch.dd @@ -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). diff --git a/std/datetime/package.d b/std/datetime/package.d index 58e71e5aa08..34fa8002f73 100644 --- a/std/datetime/package.d +++ b/std/datetime/package.d @@ -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; diff --git a/std/datetime/stopwatch.d b/std/datetime/stopwatch.d index 1dc303f61e2..630ff4a73a4 100644 --- a/std/datetime/stopwatch.d +++ b/std/datetime/stopwatch.d @@ -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)