client.py 文件源码

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

项目:CTT 作者: ZhouYzzz 项目源码 文件源码
def timer(self):
        """docstring for timer"""
        if self.RUN:
            # print 'New Frame', self.idx
            flag = time.time()

            self.readIMG() # read new frame
            self.correlation_tracker() # update correlation_tracker(s)
            # self.display() # display img and boxes

            self.checkState()
            self.singleLog()
            # self.log()
            time_consumed = time.time() - flag
            if time_consumed > 0.04:
                print 'Time > 40 ms!'
                Timer(0, self.timer).start() # excuted instantly
            else:
                Timer(0.04 - time_consumed, self.timer).start() # excute this function every 40 ms

        return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号