You can use SetTimer to create a timer and KillTimer to destroy it. In the callback procedure you can use localtime() and difftime() to get the time offset and check if it's>0