File tree Expand file tree Collapse file tree 1 file changed +30
-2
lines changed
Expand file tree Collapse file tree 1 file changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -26,16 +26,44 @@ until will always run at least once, and will run until a condition is true.
2626
2727#### EXAMPLE 2
2828``` PowerShell
29- {
29+ Invoke-PipeScript {
3030 until "00:00:05" {
3131 [DateTime]::Now
3232 Start-Sleep -Milliseconds 500
3333 }
34- } | .>PipeScript
34+ }
3535```
3636
3737#### EXAMPLE 3
3838``` PowerShell
39+ Invoke-PipeScript {
40+ until "12:17 pm" {
41+ [DateTime]::Now
42+ Start-Sleep -Milliseconds 500
43+ }
44+ }
45+ ```
46+
47+ #### EXAMPLE 4
48+ ``` PowerShell
49+ {
50+ $eventCounter = 0
51+ until "MyEvent" {
52+ $eventCounter++
53+ $eventCounter
54+ until "00:00:03" {
55+ "sleeping a few seconds"
56+ Start-Sleep -Milliseconds 500
57+ }
58+ if (-not ($eventCounter % 5)) {
59+ $null = New-Event -SourceIdentifier MyEvent
60+ }
61+ }
62+ } | .>PipeScript
63+ ```
64+
65+ #### EXAMPLE 5
66+ ``` PowerShell
3967Invoke-PipeScript {
4068 $tries = 3
4169 until (-not $tries) {
You can’t perform that action at this time.
0 commit comments