Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date time deprecate time units #21826

Merged
merged 3 commits into from
Mar 9, 2023

Conversation

daviditen
Copy link
Member

Deprecate the Time.TimeUnits enum and the functions that use it

Deprecate the Time.TimeUnits enum and the functions that take an argument
of that type. Update tests to stop using TimeUnits.

Add a deprecated test that produces the new deprecation warnings.

Deprecate the Time.TimeUnits enum and the functions that take an argument
of that type. Update tests to stop using TimeUnits.

Add a deprecated test that produces the new deprecation warnings.

Signed-off-by: David Iten <[email protected]>
Update the deprecations in the Time module to use the new attribute
syntax for marking them deprecated.

Signed-off-by: David Iten <[email protected]>
@daviditen daviditen requested review from bmcdonald3, e-kayrakli and dlongnecke-cray and removed request for bmcdonald3 and e-kayrakli March 9, 2023 19:32
@@ -698,7 +698,7 @@ proc tcpListener.accept(in timeout: struct_timeval = indefiniteTimeout):tcpConn
if timeout.tv_sec:c_long != -1 {
var totalTimeout = timeout.tv_sec:c_long*1000000 + timeout.tv_usec:c_long;
// timer didn't elapsed
if totalTimeout > t.elapsed(TimeUnits.microseconds) {
if totalTimeout > (t.elapsed()*1_000_000) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be cool if we could have a constant for this e.g., microsecondsPerSec = 1_000_000. Actually nevermind, I see we just use 1000000 everywhere else already...

@daviditen daviditen merged commit 9c22548 into chapel-lang:main Mar 9, 2023
@daviditen daviditen deleted the DateTime-deprecate-TimeUnits branch March 9, 2023 22:31
jabraham17 added a commit that referenced this pull request Jan 11, 2024
Removes a collection of previously deprecated symbols from the Time
module.

The removed symbols were deprecated in the following PRs:
- #21826
- #22028
- #19955
- #21467
- #21034
- a subset of the symbols in #23114

Testing
- [x] paratest without comm
- [x] paratest with comm
- [x] built and checked docs

[Reviewd by @riftEmber]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants