Skip to content

Commit 77a7ffa

Browse files
committed
TIMER: Compiler warnings, Windows Sleep()
- Reduce/eliminate compiler warnings - Variables that hide previous definitions (e.g., uptr) - Assignments in conditional expressions (conditional expressions should be... conditionals, i.e. "==".) - Readability: use constants for conversions, make it easier to see the time units. - Use size_t for array indices. - Windows: Prefer waitable timers over Sleep(). Sleep() is the fallback if initializing a waitable timer fails (which it doesn't, but there's no penalty for writing safe code.) A detailed discussion on Windows timers can be found at http://www.windowstimestamp.com/description Significantly reduces the occasional headache-inducing slow redraw (flicker) on Windows (Imlac, primarily, but also afflicts PDP11 VT sometimes.)
1 parent fa970d6 commit 77a7ffa

3 files changed

Lines changed: 511 additions & 323 deletions

File tree

sim_console.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ t_bool sim_signaled_int_char /* WRU character detecte
204204
#else
205205
= TRUE;
206206
#endif
207-
uint32 sim_last_poll_kbd_time; /* time when sim_poll_kbd was called */
207+
uint32 sim_last_poll_kbd_time = 0; /* time when sim_poll_kbd was called */
208208
extern TMLN *sim_oline; /* global output socket */
209209
static uint32 sim_con_pos; /* console character output count */
210210

0 commit comments

Comments
 (0)