Time and TimeAlarms Libraries – Ask here for help or suggestions

Hi Samly_dixon, Its not clear on what you want to do and I did not see the code that you are trying to get working. Can you say more about exactly what you want to test with the if statement when a button is pressed.
I noticed that you have created functions to return the current hours, minutes and seconds. These functions already exist as follows: seconds(), minutes() , hours().
You have a function named duration that has the following comment:
//function to find the variance b/w start time n stop time
But it is not clear which argument is the start time and which is the stop time. It would be clearer if you used descriptive names for your variables instead of: ms, mp,hd, md etc.

To find the difference between two times, use the time_t returned from the now()function. For example:

time_t event = now();
// … some time later
long duration = now() – event; // the duration since the event in seconds