[PR #1468] [MERGED] clock: align tick to format precision #4199

Closed
opened 2026-05-22 23:57:58 +01:00 by JakeStanger · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JakeStanger/ironbar/pull/1468
Author: @orestisfl
Created: 4/25/2026
Status: Merged
Merged: 4/25/2026
Merged by: @JakeStanger

Base: masterHead: perf/clock-tick-align


📝 Commits (1)

  • 86561cb clock: align tick to format precision

📊 Changes

1 file changed (+83 additions, -2 deletions)

View changed files

📝 src/modules/clock.rs (+83 -2)

📄 Description

Small optimization that saves quite a few cycles / wakeups.

Impact measured with:

perf stat -d -e cycles,context-switches

Before:

Performance counter stats for 'timeout 60 ./ironbar':

        289968783      cpu_atom/cycles/                                                        (54.48%)
        405203369      cpu_core/cycles/                                                        (59.51%)
              728      context-switches

     60.010151153 seconds time elapsed

      0.223719000 seconds user
      0.094606000 seconds sys

After:

Performance counter stats for 'timeout 60 ./ironbar-clock':

        261691886      cpu_atom/cycles/                                                        (56.75%)
        379525472      cpu_core/cycles/                                                        (56.14%)
              359      context-switches

     60.011738976 seconds time elapsed

      0.190068000 seconds user
      0.093777000 seconds sys

with config:

{
  "position": "top",
  "height": 24,
  "start": [],
  "center": [],
  "end": [
    {
      "type": "clock",
      "format": "%H:%M",
      "format_popup": "%H:%M"
    }
  ]
}

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/JakeStanger/ironbar/pull/1468 **Author:** [@orestisfl](https://github.com/orestisfl) **Created:** 4/25/2026 **Status:** ✅ Merged **Merged:** 4/25/2026 **Merged by:** [@JakeStanger](https://github.com/JakeStanger) **Base:** `master` ← **Head:** `perf/clock-tick-align` --- ### 📝 Commits (1) - [`86561cb`](https://github.com/JakeStanger/ironbar/commit/86561cb120f9eedb3e857f35800e51830bc3e00f) clock: align tick to format precision ### 📊 Changes **1 file changed** (+83 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/modules/clock.rs` (+83 -2) </details> ### 📄 Description Small optimization that saves quite a few cycles / wakeups. Impact measured with: ```sh perf stat -d -e cycles,context-switches ``` Before: ```text Performance counter stats for 'timeout 60 ./ironbar': 289968783 cpu_atom/cycles/ (54.48%) 405203369 cpu_core/cycles/ (59.51%) 728 context-switches 60.010151153 seconds time elapsed 0.223719000 seconds user 0.094606000 seconds sys ``` After: ```text Performance counter stats for 'timeout 60 ./ironbar-clock': 261691886 cpu_atom/cycles/ (56.75%) 379525472 cpu_core/cycles/ (56.14%) 359 context-switches 60.011738976 seconds time elapsed 0.190068000 seconds user 0.093777000 seconds sys ``` with config: ```json { "position": "top", "height": 24, "start": [], "center": [], "end": [ { "type": "clock", "format": "%H:%M", "format_popup": "%H:%M" } ] } ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
JakeStanger 2026-05-22 23:57:58 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#4199
No description provided.