I have a function called read() that interacts with some hardware and sometimes it returns the value very quickly and other times it could be very slow. I would like to have a timeout associated with my function read() so that if it takes over maybe a second then the function will timeout. I see people talking about using Boost or multi threading and am not too familiar with either. Can someone help me with this? Thanks.