- // Count the number of unread input records, including keyboard,
- // mouse, and window-resizing input records.
- GetNumberOfConsoleInputEvents(inh, &dw);
-
- // Read data from console without removing it from the buffer
- if (dw <= 0 || !PeekConsoleInput(inh, rec, Min(dw, 256), &recCnt))
- return 0;
+#if defined(_WIN32)
+ int tm = msec;
+#else
+ timespec ts, *tm = &ts;
+ uint64_t ms = Time::now() + msec;