本站改版新增arduino频道

Micropython
Arduino

micropython 延时、定时


延迟和定时

import time


time.sleep(1)           # sleep for 1 second

time.sleep_ms(500)      # sleep for 500 milliseconds

time.sleep_us(10)       # sleep for 10 microseconds

start = time.ticks_ms() # get millisecond counter

delta = time.ticks_diff(time.ticks_ms(), start) # compute time difference



推荐分享
图文皆来源于网络,内容仅做公益性分享,版权归原作者所有,如有侵权请告知删除!
 

Copyright © 2014 ESP56.com All Rights Reserved
晋ICP备14006235号-22 晋公网安备14108102001165号

执行时间: 0.009645938873291 seconds