remarknibor wrote: > Hi. > > I was wondering how to have a timer running while accepting a user's > input. Specifically, I am having someone write an essay and I'm saving > it to a variable when it's done using 'getline(cin,essay)'. However, > while the person is typing their essay, nothing else in the programme > is happening, and I'd actually like to be able to time their writing > and stop them when 10 minutes has passed. > > Any ideas as to how I could achieve this? > > Thanks in advance for the help, > > Robin.
What you are asking for is non-Standard functionality. You should start looking at GUI programming as your needs are starting to exceed the limitations of the console. Either that or use some sort of platform-specific polling mechanism (check timer, check for keypress, react to keypress, repeat) but that chews CPU (look at 'ncurses'). -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* MyTaskFocus 1.1 Get on task. Stay on task. http://www.CubicleSoft.com/MyTaskFocus/
