
エントリーの編集

エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
Raspberry Pi 4 で 5秒ごとにCPUの温度を表示させる - Qiita
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています

- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
Raspberry Pi 4 で 5秒ごとにCPUの温度を表示させる - Qiita
import time import threading import subprocess def schedule(interval, func, wait = True): base_ti... import time import threading import subprocess def schedule(interval, func, wait = True): base_time = time.time() next_time = 0 while True: t = threading.Thread(target = func) t.start() if wait: t.join() next_time = ((base_time - time.time()) % interval) or interval time.sleep(next_time) def get_cpu_temperature(): output = subprocess.check_output("cat /sys/class/thermal/thermal_zone0/temp", shell