Actually, I'm using Dev-C++. --- In [email protected], "Brett W. McCoy" <[EMAIL PROTECTED]> wrote: > > On 9/5/07, remarknibor <[EMAIL PROTECTED]> wrote: > > Rather than using threads, GUIs, etc., couldn't I just do the > > following: > > > > time_t seconds1, seconds2; > > char c; > > string essay1; > > > > seconds1 = time (NULL); > > do { > > > > if(kbhit()) { > > c = getch(); > > essay1.append(1,c); > > cout << c; > > } > > seconds2 = time (NULL); > > > > } while(seconds2 - seconds1 <= 600); // max time in seconds > > > > I came up with it this morning and it seems to do the job. The > > solution is to check the time after every key press. > > Going by the code you have here, I am guessing you are using Turbo C++? > > -- Brett > ------------------------------------------------------------ > "In the rhythm of music a secret is hidden; > If I were to divulge it, it would overturn the world." > -- Jelaleddin Rumi >
- Re: [c-prog] timing a user's input Ananth
- [c-prog] Re: timing a user's input remarknibor
- Re: [c-prog] Re: timing a user's input Brett W. McCoy
- [c-prog] Re: timing a user's input remarknibor
- Re: [c-prog] Re: timing a user's input Brett W. McCoy
- [c-prog] Re: timing a user's input Nico Heinze
- Re: [c-prog] Re: timing a user's ... Thomas Hruska
- Re: [c-prog] Re: timing a user's ... Brett W. McCoy
- [c-prog] Re: timing a user's inpu... remarknibor
- Re: [c-prog] Re: timing a user's ... Brett W. McCoy
- [c-prog] Re: timing a user's inpu... remarknibor
- Re: [c-prog] Re: timing a user's ... Brett W. McCoy
- Re: [c-prog] Re: timing a user's ... Vic Wagner
- Re: [c-prog] Re: timing a user's ... Thomas Hruska
- Re: [c-prog] Re: timing a user's ... Brett W. McCoy
- Re: [c-prog] Re: timing a user's ... Thomas Hruska
- Re: [c-prog] Re: timing a user's ... Brett W. McCoy
- Re: [c-prog] Re: timing a user's ... Brett W. McCoy
- Re: [c-prog] Re: timing a user's inpu... Ananth
- Re: [c-prog] Re: timing a user's input Thomas Hruska
- [c-prog] create udp packet Muneeb Dawood
