--- In [email protected], "Brett W. McCoy" <[EMAIL PROTECTED]> wrote:
>
> On 9/4/07, remarknibor <[EMAIL PROTECTED]> wrote:
> 
> > I just run it from the command prompt in that window, so a
> > console one. The code isn't very revealing, but this is the
> > bit in which i'd like to embed the time check:
> 
> As Thomas remarked before, you won't be able to do what you
> want with just plain ol' console code... you will need to
> design come event-handling into your application. There are
> console APIs (like ncurses) that can handle this for you, and
> provide you with text windows, menus, I/O handling, etc.
> Or go the full route and write a Windows application (which
> is event-based to begin with) using one of the many toolkits
> available. I'd start with something like wxWindows or fltk,
> they are relatively easy to use, unless you really want to
> delve into the Windows SDK.
<snip>

One alternative might be to use a multi-threaded application; one
thread starts a timer which will run 10 minutes; the other thread
invokes getline(). If the timer expires before the getline() thread
has finished, then stop the getline() thread and proceed as you like.
Brute force but the only way I see without diving right into Windows
programming including all its message-based architecture; in this
point I totally agree with Brett and Thomas.

Regards,
Nico

Reply via email to