en fait la RTCLib, outre la classe DateTime fournit une autre classe, la classe TimeSpan et implémente directement les additions et soustractions
DateTime operator+(const TimeSpan &span);
DateTime operator-(const TimeSpan &span);
TimeSpan operator-(const DateTime &right);
donc vous pouvez faire
DateTime t1 = rtc.now();
....
DateTime t2 = rtc.now();
TimeSpan delta = t2 - t1;
vous pouvez ensuite demander à la variable delta différentes choses
int16_t days(); // Number of days in the TimeSpan
int8_t hours() // Number of hours in the TimeSpan ,
int8_t minutes() // Number of minutes in the TimeSpan (not the total minutes)
int8_t seconds() // Number of seconds in the TimeSpan
int32_t totalseconds() // Total number of seconds in the TimeSpan