Ken Takata wrote:
> 2016/11/25 Fri 1:23:12 UTC+9 Bram Moolenaar wrote:
> > Patch 8.0.0097
> > Problem: When a channel callback consumes a lot of time Vim becomes
> > unresponsive. (skywind)
> > Solution: Bail out of checking channel readahead after 100 msec.
> > Files: src/os_unix.c, src/misc2.c, src/vim.h, src/os_win32.c
>
> > + long
> > + elapsed(DWORD start_tick)
> > + {
> > + DWORD now = GetTickCount();
> > +
> > + if (now < start_tick)
> > + /* overflow */
> > + return (long)now;
> > + return (long)now - (long)start_tick;
> > + }
>
> I don't think overflow checking is needed here.
>
> return (long)now - (long)start_tick;
>
> should work on Windows even if overflow occurs.
DWORD is 32 bits unsigned, right? And long is 32 bits signed.
I suppose that works.
--
hundred-and-one symptoms of being an internet addict:
49. You never have to deal with busy signals when calling your ISP...because
you never log off.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.