First, you must include the library and create an instance of the RTC object. You must define which Arduino pins are connected to the RTC module.
delay(60000); // Log every minute
The Virtuabotix RTC library offers several features that make it a popular choice among Arduino users: virtuabotixrtc.h arduino library