Skip to content

fix(#568): use adaptive per-instance intervals in useRelativeTime - #622

Merged
dotunv merged 1 commit into
Savitura:mainfrom
Lazaruster:fix/568-use-relative-time-adaptive-interval
Jul 28, 2026
Merged

fix(#568): use adaptive per-instance intervals in useRelativeTime#622
dotunv merged 1 commit into
Savitura:mainfrom
Lazaruster:fix/568-use-relative-time-adaptive-interval

Conversation

@Lazaruster

Copy link
Copy Markdown
Contributor

closes #568

  • Add getIntervalMs() helper that returns refresh frequency based on timestamp age: 30s for recent, 60s for >1min, 5min for >1h, null (no timer) for timestamps older than 24h
  • Each hook instance now schedules its own timer only when needed, eliminating unnecessary re-renders for stale timestamps

…Time

- Add getIntervalMs() helper that returns refresh frequency based on
  timestamp age: 30s for recent, 60s for >1min, 5min for >1h, null
  (no timer) for timestamps older than 24h
- Each hook instance now schedules its own timer only when needed,
  eliminating unnecessary re-renders for stale timestamps
@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@Lazaruster Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@dotunv
dotunv merged commit ceeed34 into Savitura:main Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: useRelativeTime global interval shared by every instance

2 participants