Solve my Timer program | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Solve my Timer program

def timer( start ) puts "Minutes: " + start.to_s start_time = Time.now puts start_time.strftime("Start to_time: %I:%M:%S %p") start.downto(1) { |i| sleep 60 } end_time = Time.now print end_time.strftime("Elapsed time: %I:%M:%S %p") end timer 10 #someone please check this code

27th Nov 2018, 1:14 PM
Anand Raja
Anand Raja - avatar
2 Answers
+ 4
Is there any problem you are facing?
27th Nov 2018, 2:17 PM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
0
Yes bro. I'm getting an output "time limit exceeded"
4th Dec 2018, 2:04 PM
Anand Raja
Anand Raja - avatar