From b50535b79a9e762706383fbee8a2373c1f1db8eb Mon Sep 17 00:00:00 2001 From: anon47 Date: Tue, 13 Feb 2024 10:39:33 -0700 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20autobudilnik.rb?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- autobudilnik.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/autobudilnik.rb b/autobudilnik.rb index 7311352..a9b347e 100644 --- a/autobudilnik.rb +++ b/autobudilnik.rb @@ -93,6 +93,7 @@ suffix = waittimestr.delete('0-9') case suffix when '' waittime = waittimestr.to_i + waittimestr += 's' when 'd' waittime = waittimestr.to_i * 86400 when 'm' @@ -105,12 +106,12 @@ else raise "'#{suffix}' suffix is not found" end -if waittime > 17 +if waittime > 18 puts 'waittime:' + waittimestr waittime = waittime - 18 # 30 x 0.6 = 18 else - puts "18 seconds is the minimum\nwaittime:18" - waittime = 0 + puts "19 seconds is the minimum\nwaittime:19s" + waittime = 1 end nexttime = Time.new + waittime @@ -160,7 +161,7 @@ while true sleep(0.6) #НУЖНО УБАВИТЬ С ВЭЙТТАЙМА a2.call(175) } - puts "turn on audio" + puts "starts audio" system('zadacha1.bat ' + audiofilepath) end sleep(3.4)