Skip to content

get_fps 始终是60.. #4

Open
Open
@Tonyzhangcanon

Description

@Tonyzhangcanon

看了一下源码,没有弄清楚获取time_block的关键字段在哪里

    for frame in frames:
        time_block = re.split(r'\s+', frame.strip())
        if len(time_block) == 3:
            try:
                print time_block
                render_time = float(time_block[0]) + float(time_block[1]) + float(time_block[2])
                print render_time
            except Exception as e:
                render_time = 0
        if render_time > 16.67:
            print 'here'
            jank_count += 1
            if render_time % 16.67 == 0:
                vsync_overtime += int(render_time / 16.67) - 1
            else:
                vsync_overtime += int(render_time / 16.67)

第一个if 只会报出异常导致render_time = 0. 第二个if 也不会执行.. 最后直接就只能输出60...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions