summaryrefslogtreecommitdiffstats
path: root/mbbsd/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/io.c')
-rw-r--r--mbbsd/io.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/mbbsd/io.c b/mbbsd/io.c
index 39b62836..1c3f9e7a 100644
--- a/mbbsd/io.c
+++ b/mbbsd/io.c
@@ -169,20 +169,12 @@ dogetch(void)
}
if (len == 0){
-#ifdef OUTTA_TIMER
- now = SHM->GV2.e.now;
-#else
- now = time(0);
-#endif
+ syncnow();
return I_TIMEOUT;
}
if (i_newfd && FD_ISSET(i_newfd, &readfds)){
-#ifdef OUTTA_TIMER
- now = SHM->GV2.e.now;
-#else
- now = time(0);
-#endif
+ syncnow();
return I_OTHERDATA;
}
}
@@ -209,11 +201,7 @@ dogetch(void)
}
if (currutmp) {
-#ifdef OUTTA_TIMER
- now = SHM->GV2.e.now;
-#else
- now = time(0);
-#endif
+ syncnow();
/* 3 秒內超過兩 byte 才算 active, anti-antiidle.
* 不過方向鍵等組合鍵不止 1 byte */
if (now - lastact < 3)