aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c
index b47f0e881..e668f41e1 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -12619,7 +12619,7 @@ readcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
12619 backslash = 0; 12619 backslash = 0;
12620#if ENABLE_ASH_READ_TIMEOUT 12620#if ENABLE_ASH_READ_TIMEOUT
12621 if (timeout) /* NB: ensuring end_ms is nonzero */ 12621 if (timeout) /* NB: ensuring end_ms is nonzero */
12622 end_ms = ((unsigned)(monotonic_us() / 1000) + timeout) | 1; 12622 end_ms = ((unsigned)monotonic_ms() + timeout) | 1;
12623#endif 12623#endif
12624 STARTSTACKSTR(p); 12624 STARTSTACKSTR(p);
12625 do { 12625 do {
@@ -12630,7 +12630,7 @@ readcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
12630 struct pollfd pfd[1]; 12630 struct pollfd pfd[1];
12631 pfd[0].fd = fd; 12631 pfd[0].fd = fd;
12632 pfd[0].events = POLLIN; 12632 pfd[0].events = POLLIN;
12633 timeout = end_ms - (unsigned)(monotonic_us() / 1000); 12633 timeout = end_ms - (unsigned)monotonic_ms();
12634 if ((int)timeout <= 0 /* already late? */ 12634 if ((int)timeout <= 0 /* already late? */
12635 || safe_poll(pfd, 1, timeout) != 1 /* no? wait... */ 12635 || safe_poll(pfd, 1, timeout) != 1 /* no? wait... */
12636 ) { /* timed out! */ 12636 ) { /* timed out! */