implement realtime/wallclock statusline timer#543
Open
aoeixsz4 wants to merge 4 commits intoNetHack:NetHack-3.7from
Open
implement realtime/wallclock statusline timer#543aoeixsz4 wants to merge 4 commits intoNetHack:NetHack-3.7from
aoeixsz4 wants to merge 4 commits intoNetHack:NetHack-3.7from
Conversation
moon-chilled
reviewed
Jul 3, 2021
win/tty/wintty.c
Outdated
| } else { | ||
| #ifdef UNIX | ||
| #ifdef REALTIME_ON_BOTL | ||
| fd_set read_set; |
There was a problem hiding this comment.
i think something like
struct pollfd pf;
pf.fd = 0;
pf.events = POLLIN;
for (;;) {
if (poll(&pf, 1, 1000)) {
tgetch stuff
} else {
update stats
Author
There was a problem hiding this comment.
oooo u can give the poll thing a timer
got it
moon-chilled
reviewed
Jul 3, 2021
win/tty/wintty.c
Outdated
| #endif /* ?HANGUP_HANDLING */ | ||
|
|
||
| #ifdef REALTIME_ON_BOTL | ||
| #include <sys/select.h> |
There was a problem hiding this comment.
should be guarded by #ifdef UNIX or so too
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this pr implements the ui clock developed by @bhaak in such a way that it can update independently of user input
for tty it uses pselect(), for curses they have their own timeout functionality
i am unsure about the portability of this, only tested on Ubuntu 20.04 with Linux kernel 5.8.0-59-generic