interrupt command

0 Franz Schmidt · May 7, 2015
i know that commands like gets or getline or cin and all these input functions wait till the user made his/her input and then continues with the programm.
Is there a way to only wait for lets say 10s or something like that and if nothing gets entered the programm continues by it selft?

Post a Reply


Oldest  Newest  Rating
0 c student · May 7, 2015
EDIT: Just realised this won't work
0 Franz Schmidt · May 7, 2015
is there also a solution for microcontrollers where windows.h is not available?
0 Michael Bradford · May 7, 2015
The way to do something like this when windows.h is not available is to use Chrono from stdlib.
0 Franz Schmidt · May 7, 2015
sry my bad i did post this topic under c++ but it belongs just to c.
is it also possible to do it with plain c methods or a library for multithreading or something like this.
0 c student · May 7, 2015
  • 1



Used in many types of software including music players, video games, and many large scale applications.

Bucky Roberts Administrator