I'm not sure I understand what you need, exactly(please elaborate), but if you mean that you need a C function to detect if any three buttons are pressed within three seconds of each other, it should look something like this:
bool HaveThreeButtonsBeenPressedWithinThreeSecondsOfEachOther( void )
{ //Start function.
int accumulator = 0; //0 seconds have passed so far.
int numOfButtons = 0; //The number of buttons pressed.
while(accumulator <= 3)
{
while(/*Onesecondhaspassed ==*/true)
{
if(onebuttonofthetypeispressed)
{
numOfButtons++;//Increment the number of buttons pressed.
}
accumulator++;//Show that one second has passed.
}
}
if(numOfButtons == 3)
{
return true;
}
else
{
return false;
}
}
Of course, I wouldn't trust this code, as I haven't programmed in C/C++ for quite a while, having shown much more intrest in C# (in my opinion, the best programming language, for now, at least). And I got kinda lost in the middle(

), as I have never had to program in a text editor like this ever (Always used syntax highlighting and auto-indentation, etc.).
But this should be the general idea, presuming you need what I assummed you needed. OK, I'm just confusing you now. I'll be quiet now.
