From f96e966dc61293b48e2eb29e9f933f0db02de26e Mon Sep 17 00:00:00 2001 From: anon47 Date: Thu, 1 Feb 2024 10:45:18 -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 | 58 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 47 insertions(+), 11 deletions(-) diff --git a/autobudilnik.rb b/autobudilnik.rb index be284d5..94d0217 100644 --- a/autobudilnik.rb +++ b/autobudilnik.rb @@ -6,8 +6,9 @@ za = [false,false,false] nf = '' da = '' audiofilepath = "audio.opus" -waittime = 7200 +waittimestr = "2h" configfilepath = "config.txt" + i=0;while i 17 + puts 'waittime:' + waittimestr + waittime = waittime - 18 # 30 x 0.6 = 18 +else + puts "18 seconds is the minimum\nwaittime:18" + waittime = 0 +end + nexttime = Time.new + waittime -waittime = waittime - 18 # 30 x 0.6 = 18 =begin STDIN.echo = false STDIN.raw! @@ -124,7 +160,7 @@ while true sleep(0.6) #НУЖНО УБАВИТЬ С ВЭЙТТАЙМА a2.call(175) } - puts "audioplay" + puts "turn on audio" system(audiofilepath) end sleep(3.4)