Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
テキストを返す前に一時停止する必要があるプログラムをルビーで記述しようとしています。 Python では、時間をインポートしてから time.sleep(x) を使用することでこれを行うことができます。Rubyでこれを行うにはどうすればよいでしょうか。
元。Pythonで print ("you say hello") time.sleep(5) print ("I say goodbye")
print ("you say hello") time.sleep(5) print ("I say goodbye")
あなたの例では、単に使用します
sleep(5)