utils.py 文件源码

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

项目:dwinelle-tools 作者: dkess 项目源码 文件源码
def get_logentry_at_time(*args):
    '''
    If one argument is provided, get the LogEntry corresponding to the given
    unix time (in milliseconds).  If two arguments are provided, get the 
    LogEntry at clipid (first argument) and time in that clip in milliseconds
    (second argument).
    '''

    if len(args) == 1:
        unixtime = args[0]
    else:
        unixtime = timestamp_from_video(*args)

    for logentry in get_logentries():
        if logentry.starttime <= unixtime < logentry.endtime:
            return logentry
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号