Skip to content

[macOS] OS::GetCurrentMonotonicTicks should probably use CLOCK_UPTIME_RAW. #55071

@knopp

Description

@knopp

This would corresponds to other macOS API such as CACurrentMediaTime(). Otherwise we have a problem where DisplayLink callback gives target timestamp in based on CLOCK_UPTIME_RAW, but fml::TimePoint expects CLOCK_MONOTONIC_RAW.

Also the documentation for mach_absolute_time suggests clock_gettime_nsec_np(CLOCK_UPTIME_RAW) as suitable replacement and clock_gettime_nsec_np(CLOCK_UPTIME_RAW) is not mentioned in the prohibited boot time API list.

@rmacnak-google

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.needs-infoWe need additional information from the issue author (auto-closed after 14 days if no response)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions