File tree Expand file tree Collapse file tree 1 file changed +34
-2
lines changed
Expand file tree Collapse file tree 1 file changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -152,17 +152,49 @@ Most keywords will be implemented as a Transpiler that tranforms a CommandAST.
152152
153153
154154~~~ PowerShell
155- {
155+ Invoke-PipeScript {
156156 until "00:00:05" {
157157 [DateTime]::Now
158158 Start-Sleep -Milliseconds 500
159159 }
160- } | .>PipeScript
160+ }
161161~~~
162162
163163## Until Example 3
164164
165165
166+ ~~~ PowerShell
167+ Invoke-PipeScript {
168+ until "12:17 pm" {
169+ [DateTime]::Now
170+ Start-Sleep -Milliseconds 500
171+ }
172+ }
173+ ~~~
174+
175+ ## Until Example 4
176+
177+
178+ ~~~ PowerShell
179+ {
180+ $eventCounter = 0
181+ until "MyEvent" {
182+ $eventCounter++
183+ $eventCounter
184+ until "00:00:03" {
185+ "sleeping a few seconds"
186+ Start-Sleep -Milliseconds 500
187+ }
188+ if (-not ($eventCounter % 5)) {
189+ $null = New-Event -SourceIdentifier MyEvent
190+ }
191+ }
192+ } | .>PipeScript
193+ ~~~
194+
195+ ## Until Example 5
196+
197+
166198~~~ PowerShell
167199 Invoke-PipeScript {
168200 $tries = 3
You can’t perform that action at this time.
0 commit comments