GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Improve Start-Sleep cmdlet to accept fractional seconds by Prototyyppi · Pull Request #8537 · PowerShell/PowerShell

Conversation

@Prototyyppi

@Prototyyppi Jani Laitinen (Prototyyppi) commented Dec 24, 2018 •
edited by SteveL-MSFT
Loading

Uh oh!

There was an error while loading. Please reload this page.

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

  • PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • Summarized changes
  • Change is not breaking
  • Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
  • This PR is ready to merge and is not Work in Progress.
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready.
  • User-facing changes
    • Not Applicable
    • OR
    • User-facing Documentation needed
      • Issue filed - Issue link:
  • Testing - New and feature
    • Not Applicable or can only be tested interactively
    • OR
    • Make sure you've added a new test if existing tests do not effectively test the code changed
      • Add [feature] if the change is significant or affects feature tests

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mklement0 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@Prototyyppi
Improve accuracy of Start-Sleep cmdlet (PowerShell#8477)
37ed2f1
- "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.
@Prototyyppi
Jani Laitinen (Prototyyppi) requested review from James Truher (JamesWTruher) and Paul Higinbotham (PaulHigin) as code owners December 24, 2018 20:51
@msftclas

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

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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

Steve Lee (SteveL-MSFT) commented Dec 25, 2018

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.

Prototyyppi reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

iSazonov
Ilya (iSazonov) reviewed Dec 25, 2018
View reviewed changes
Comment thread test/powershell/Modules/Microsoft.PowerShell.Utility/Start-Sleep.Tests.ps1 Resolved

Uh oh!

There was an error while loading. Please reload this page.

@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

Ilya (iSazonov) commented Dec 25, 2018

Copy link
Copy Markdown
Collaborator

I updated the PR header.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Prototyyppi
Modified existing tests to test fractional seconds
a21c44f
iSazonov
Ilya (iSazonov) reviewed Dec 25, 2018
View reviewed changes
Comment thread test/powershell/Modules/Microsoft.PowerShell.Utility/Start-Sleep.Tests.ps1 Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Prototyyppi
Wait time comment fix
d0a8304
iSazonov
Ilya (iSazonov) approved these changes Dec 25, 2018
View reviewed changes
@iSazonov

Ilya (iSazonov) commented Dec 25, 2018

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@SteveL-MSFT

Steve Lee (SteveL-MSFT) commented Jan 9, 2019

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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
PaulHigin
Paul Higinbotham (PaulHigin) approved these changes Jan 10, 2019
View reviewed changes
@SteveL-MSFT Steve Lee (SteveL-MSFT) assigned Aditya Patwardhan (adityapatwardhan) Jan 10, 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-contribs/PowerShell that referenced this pull request Aug 6, 2026
@Prototyyppi @adityapatwardhan
Improve Start-Sleep cmdlet to accept fractional seconds (PowerShell#8537
12f028f
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@iSazonov Ilya (iSazonov) iSazonov approved these changes
@JamesWTruher James Truher (JamesWTruher) Awaiting requested review from JamesWTruher
+1 more reviewer
@PaulHigin Paul Higinbotham (PaulHigin) PaulHigin approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@adityapatwardhan Aditya Patwardhan (adityapatwardhan)

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

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Make Start-Sleep accept fractional seconds

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@Prototyyppi @msftclas @SteveL-MSFT @iSazonov @PaulHigin @adityapatwardhan
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.