The connection differs depending on the expansion board you’re using. To use the RTC in either board you need to have a battery or apply power to the proper pins in order for the RTC to work. In the Arduino expansion board you need to look for the header J2. If you’re using the mini breakout board look at J18-pin 5.
In this thread you can see more information on how to configure the RTC RTC 1307 - Real Time Clock in Linux.
Let me know if this helps.
The function to set the RTC clock is called 'date':
Gooogle SIGALRM interrupts.
Here is an example:
now = time(NULL);
printf("Arrange SIGALRM to be delivered in 10 seconds\n");