how to cause interrupts using c++

Hi guys .. Here is my scenario, I am getting data out of say an interface or a port for example say a computers interface that gets packets from our modem. Now i want a way to detect a new burst of data to be detected. In my program i am running a count down timer.once data is detected i want the timer to be stopped and check what type of data i recieved. I can create a function within the countdown timer loop but this can get very inefficient since everytime i countdown i ahve to execute the function which can cause a lot of overhead. So is there any features in c++ that can help me do it in a more efficient manner?
closed account (S6k9GNh0)
I'm not quite at this stage yet but I found this earlier today: http://www.experts-exchange.com/Programming/Languages/CPP/Q_20413123.html

It gives an example of an interrupt in Visual C++ which should apply to all compilers (or mostly).
All Windows compilers that is.

Depends on your platform. If using Un*x or equivalent, I would use the select() system call if I had a file descriptor interface for the hardware.
He thanks a lot guys. Was helpful.
Topic archived. No new replies allowed.