mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 21:15:52 +03:00
[PR #782] [CLOSED] Use a monotonic clock for renderer scheduling #1560
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#1560
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/782
Author: @ermalos
Created: 3/5/2026
Status: ❌ Closed
Base:
main← Head:fix/monotonic-renderer-scheduling📝 Commits (1)
edbf3faUse a monotonic clock for renderer scheduling📊 Changes
2 files changed (+60 additions, -6 deletions)
View changed files
📝
packages/core/src/renderer.ts(+21 -6)➕
packages/core/src/tests/renderer.clock.test.ts(+39 -0)📄 Description
Summary
Date.now()-based renderer scheduling with a monotonic clockrequestRender()Why
On WSL, host/guest time corrections can jump the wall clock backwards. The renderer currently uses
Date.now()to compute request/render delays, so a backward jump can turn a 16ms frame delay into a multi-second stall.Testing
npx --yes bun@1.3.10 test packages/core/src/tests/renderer.clock.test.ts packages/core/src/tests/renderer.control.test.ts packages/core/src/tests/renderer.idle.test.ts🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.