feat(libwebrtc): implement rtc::TimeMillis and rtc::TimeMicros #13764
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13764"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by jacknieland on 2026-10-31T04:59:20Z.
What
Implements
rtc::TimeMillis()andrtc::TimeMicros()in libwebrtc. Both threw, and were declared without a return type.The module's WebRTC revision is between M127 and M134, as #13687 records in the debt file.
TimeNanos,TimeMillisandTimeMicrosinrtc_base/time_utils.cc, and the POSIXSystemTimeNanosinrtc_base/system_time.cc, are the same at M127 branch-heads/6533 and M134 branch-heads/6998.int64_t. They read the guestCLOCK_MONOTONIC(4) through libkernel'sclock_gettime, convert it to nanoseconds, and divide by 1,000,000 or 1,000, as upstream does.g_clockfirst, but onlyrtc::SetClockForTestingsets it, and the module doesn't export that function, so that path is left out.clock_gettimefails, the call throws.WEBRTC_EXCLUDE_SYSTEM_TIMEand its own clock. The pending count drops from 411 to 409.Tested
Windows 11 Pro (26200), WinLibs GCC 15.2.0 (
x86_64-ucrt-posix-seh, r7), Release,BUILD_TESTING=ON, Ninja, on head8901150f8a(this branch, on #13687).guest_webrtc_timetest:CLOCK_MONOTONICreadings taken before and after it, in the same unit.ctest -R guest_webrtc --repeat until-fail:5:guest_webrtc_timeand #13687'sguest_webrtc_fast_int_to_bufferpass all 5 runs.ctest -R public_headers: 65/65 pass.NotImplemented_nid_no_patch(__func__),guest_webrtc_timefails with_ZN3rtc10TimeMillisEv_nid_postfix not implemented.check_conventions.py --base origin/mainpasses. An overlap scan of every open pull request's diff found no other PR that changes these two exports.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-31T06:23:55Z.
Review: COMMENTED
Linux run of head
8901150f8a, merged (--no-commit) ontomain6a691f69ee. Ubuntu 26.04 (kernel 7.0), GCC 15.2.0, CMake 4.2.3, Ninja, Release,BUILD_TESTING=ON, i7-8700. The description lists Linux as not tested, so this is that run.guest_webrtc_timeandguest_webrtc_fast_int_to_buffer: pass 3/3.webrtc: 2/2.public_headers: 65/65.rtc::TimeMillisandrtc::TimeMicros(a stand-in for themainstubs) makesguest_webrtc_timeabort 3/3.Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.