Skip to content

Instantly share code, notes, and snippets.

@hamaguchi-amago
Created January 18, 2023 18:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hamaguchi-amago/fa528668382deafd491c99e1b44ce65a to your computer and use it in GitHub Desktop.
Save hamaguchi-amago/fa528668382deafd491c99e1b44ce65a to your computer and use it in GitHub Desktop.
import time
from datetime import datetime
def function(i):
print(f"実行: {i}回目 ({datetime.now()})")
max_num = 5
wait_time = 0.5
for i in range(max_num):
time.sleep(wait_time)
function(i)
@hamaguchi-amago
Copy link
Author

ブログのサンプルとして作成しました。

【Python】sleep関数を使って処理を停止する・繰り返す
https://neko-py.com/python-sleep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment