You will find them in socket programming. It is used a lot in programming in unix and linux but windows uses threads and messages more than poling. Ken -----Original Message----- From: programmingblind-bounce@xxxxxxxxxxxxx [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Alex Hall Sent: Sunday, June 08, 2008 1:45 PM To: programmingblind@xxxxxxxxxxxxx Subject: RE: beepclock code attempt 2 Thanks. I will try to adapt these functions to get them to work with my program. This looks like just what I am looking for. Are these types of loop ever used anywhere else in programming? I have never heard of them before. Have a great day, Alex > ----- Original Message ----- >From: "Ken Perry" <whistler@xxxxxxxxxxxxx >To: <programmingblind@xxxxxxxxxxxxx >Date sent: Sun, 8 Jun 2008 11:39:31 -0700 >Subject: RE: beepclock code attempt 2 >Select is a c or c++ function that waits for input on sockets or pipes. >Since standard in and out are just input pipes you can put them in the >select statement to be waited on. It can be made to be non blocking so that >the rest of your program can continue while it is waiting on input. When >it gets input the next time through the loop the input list will be set so >that you can test for input. An example of this would be on this page >http://cc.byexamples.com/20070408/non-blocking-user-input-in-loop -without-nc >urses/ >This is what they call a poling loop. You loop round and round asking if >you have input if you don't you go on doing what ever you want the program >to do in your case you would want to check for input, check to see if time >had changed, and then wait one second.. >Ken __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind