add option idlecheckpoint
New experimental option This requires platform support to be useful. Currently an implementation for Windows TTY console is included. A Unix TTY implementation should be achievable I would think, but I haven't pursued that, at least not yet (contributions welcome). I'm not sure whether Qt or X11 interfaces offer a similar timeout capability.. How it works: When idlecheckpoint in on, if the wait for a new input is idle for 10 seconds (length of time to waite is controlled by IDLECHECKPOINT_WAIT_TIME #define in hack.h), save_currentstate() is called to bring everything up-to-date should a hangup or crash occur. The input wait then continues/resumes. The save_currentstate() call is only executed once per input request.
This commit is contained in:
@@ -300,7 +300,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
|
||||
if WINDOWPORT(tty) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 20; ++i) {
|
||||
for (i = 0; i < 5; ++i) {
|
||||
nh_delay_output();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user