usched.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:micropython-dev-kit 作者: db4linq 项目源码 文件源码
def _idle_thread(self):
        if self.gc_enable and (self.last_gc == 0 or after(self.last_gc) > GCTIME):
            gc.collect()
            gc.threshold(gc.mem_free() // 4 + gc.mem_alloc())
            self.last_gc = ticks_us()
        if self.heartbeat is not None and (self.last_heartbeat == 0 or after(self.last_heartbeat) > HBTIME):
            if platform == 'pyboard':
                self.heartbeat.toggle()
            elif platform == 'esp8266':
                self.heartbeat(not self.heartbeat())
            self.last_heartbeat = ticks_us()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号