Attribut Le module Errror 'time' n'a pas d'anomalie 'clock'

Source: Time.cock() a été aboli depuis le python3.3

Une anomalie:

Ajouter l’environnement Python3.8 à pycharm, appelant time.clock: Attribut Errror ‘time’ n’a pas d’attribut ‘clock’

Après Doo-sama, la raison est:

Python 3.8 ne supporte plus time.clock mais inclut toujours la méthode lorsqu’elle est appelée;

Manipulation efficace des éléments suivants:

Remplacer partime.perf_counter()

  1. import heure
  2. tis1 =heure.perf_counter()
  3. imprimer(« Atteint pendant cinq secondes… »)
  4. heureDormez.(5)
  5. tis2=heure.perf_counter()
  6. imprimer(tis2-tis1)
  1. Attendez 5 secondes…

未经允许不得转载:萌萌Apprentissage » Attribut Le module Errror 'time' n'a pas d'anomalie 'clock'

J’aime (0) 打赏

Commentaires 0

Protected with IP Blacklist CloudIP Blacklist Cloud
  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏

//下一个脚本特效
//下一个脚本