Skip to content

Improve Start-Sleep cmdlet to accept fractional seconds - #8537

Merged
Aditya Patwardhan (adityapatwardhan) merged 3 commits into
PowerShell:masterfrom
Prototyyppi:start-sleep-accuracy-fix
Jan 14, 2019
Merged

Improve Start-Sleep cmdlet to accept fractional seconds#8537
Aditya Patwardhan (adityapatwardhan) merged 3 commits into
PowerShell:masterfrom
Prototyyppi:start-sleep-accuracy-fix

Conversation

@Prototyyppi

@Prototyyppi Jani Laitinen (Prototyyppi) commented Dec 24, 2018

Copy link
Copy Markdown
Contributor

PR Summary

  • "Seconds" parameter of Start-Sleep function is now interpreted as
    double. This removes the rounding error when the parameter with
    fractions is converted to milliseconds.
  • ValidateRangeAttribute parameters converted to double to remove error
    when Seconds parameter is now of double type.

Fix #8477

PR Checklist

- "Seconds" parameter of Start-Sleep function is now interpreted as
  double. This removes the rounding error when the parameter with
  fractions is converted to milliseconds.
- ValidateRangeAttribute parameters converted to double to remove error
  when Seconds parameter is now of double type.
@msftclas

Microsoft Contribution License Agreements (msftclas) commented Dec 24, 2018

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@SteveL-MSFT Steve Lee (SteveL-MSFT) added Breaking-Change breaking change that may affect users Review - Committee The PR/Issue needs a review from the PowerShell Committee labels Dec 25, 2018
@SteveL-MSFT

Copy link
Copy Markdown
Member

Jani Laitinen (@Prototyyppi) Thanks for your first time contribution! I've modified your description to include the issue being fixed so that it closes automatically when this PR is merged. Since cmdlets are also public C# apis, @PowerShell/powershell-committee needs to review this before we can merge. Because of the holidays in the US, the PS-Committee won't meet again til after the new year.

Comment thread test/powershell/Modules/Microsoft.PowerShell.Utility/Start-Sleep.Tests.ps1 Outdated
@iSazonov Ilya (iSazonov) changed the title Improve accuracy of Start-Sleep cmdlet (#8477) Improve Start-Sleep cmdlet to accept fractional seconds (#8477) Dec 25, 2018
@iSazonov

Copy link
Copy Markdown
Collaborator

I updated the PR header.

Comment thread test/powershell/Modules/Microsoft.PowerShell.Utility/Start-Sleep.Tests.ps1 Outdated
@iSazonov

Copy link
Copy Markdown
Collaborator

Jani Laitinen (@Prototyyppi) Thanks for your contribution! Please wait PowerShell Committee approval for the public API change.

@SteveL-MSFT

Copy link
Copy Markdown
Member

@PowerShell/powershell-committee reviewed this, cmdlets are not intended to be public APIs, so no concern with taking this change

@SteveL-MSFT Steve Lee (SteveL-MSFT) added Committee-Reviewed PS-Committee has reviewed this and made a decision and removed Review - Committee The PR/Issue needs a review from the PowerShell Committee labels Jan 9, 2019
@adityapatwardhan Aditya Patwardhan (adityapatwardhan) added the CL-BreakingChange Indicates that a PR should be marked as a breaking change in the Change Log label Jan 14, 2019
@adityapatwardhan Aditya Patwardhan (adityapatwardhan) changed the title Improve Start-Sleep cmdlet to accept fractional seconds (#8477) Improve Start-Sleep cmdlet to accept fractional seconds Jan 14, 2019
@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) merged commit 812456f into PowerShell:master Jan 14, 2019
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj/PowerShell that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Breaking-Change breaking change that may affect users CL-BreakingChange Indicates that a PR should be marked as a breaking change in the Change Log Committee-Reviewed PS-Committee has reviewed this and made a decision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Start-Sleep accept fractional seconds

6 participants