Answer the question
In order to leave comments, you need to log in
Is it possible in PowerShell to make a timer wait for a specific time?
Please tell me, is it possible to insert a timer in the middle of the script, which will not count seconds, but will wait until it is 18:45 according to the system time - then continue executing the rest of the script?
Answer the question
In order to leave comments, you need to log in
Could be so
$StartDate=(Get-Date) # текущая дата
$EndDate = [datetime]”11/12/2015 17:50” # необходимая дата и время. формат м/д/г
$secs_towait = (New-TimeSpan –Start $StartDate –End $EndDate).Seconds # выгружаем информацию о разнице в секундах
Start-Sleep -Seconds $secs_towait # приостанавливаем выполнение программы на $secs_towait секунд
Yes, but you have to use .NET
You can of course use a crooked solution like this
PS C:\Users\sst> $a=[datetime]::now.date
PS C:\Users\sst> $a=$a.addhours(16)
PS C:\Users\sst> $a=$a.addminutes(40)
PS C:\Users\sst> $a
11 ноября 2015 г. 16:40:00
PS C:\Users\sst> start-sleep ($a-[datetime]::now).totalseconds;write "timer"
This is a table. Use it for this task. Those. not the table itself, but display:table, table-cell
For a block with text, it is enough to specify overflow: hidden;
Just give the text block a float CSS attribute. Here you can see: example
Create 2 blocks, in one picture, in the other text. Image with float: left, text with float: right in css styles
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question