-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix clock display (regression from conflict resolution for #106) #128
Conversation
Thinking about this after a good night... it is not a good idea to depend on execution timing for a CI test to succeed. A better approach would be to remove the display of the time altogether, or replace it with a fixed, dummy string. For example, replace commit af9827c with something like this: // In paint_plot:
if (!keep_time_fixed)
asctime_r(lt, ls);
// In main:
keep_time_fixed = getenv("FIXED_TIME") != NULL;
if (keep_time_fixed)
strcpy(ls, "Thu Jan 1 00:00:00 1970"); |
@edgar-bonet I would like to agree but:
I'm happy to sleep over this more, but right now I'm in favor of keeping a moving clock display. But maybe we can make the UI testing CI more robust some other way in a follow-up pull request? What do you think? |
fd06ab9
to
2e6f30a
Compare
2e6f30a
to
17f9e8c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even without any clock display the CI will still rely on close-enough timing [...] we could end up making screenshots right in the middle of a redraw
I didn't think about that. Actually, I don't event know how agg works. Ideally, it should be able to sync itself with ncurses' paint events, but I guess that's not easy...
On the other hand, I am planning to break this again in the future by making the clock display more “correct”, i.e. updating on the edges of system clock seconds.
Anyway, this PR is really not disruptive. Let's get it merged, even though we may have to rethink it later.
@edgar-bonet thanks!
We can keep this for later, but if you feel like elaborating already now, I'd be curious to learn more about it. |
My idea is to set the timeout as the time remaining until the next full second. This way But yes, this will be for later... |
@edgar-bonet that is an interesting idea, but it seems to assume that the process runtime between |
Regression from merge commit 95467bf related to #106.