 	}
 }
 
+time_t nowTimestamp()
+{
+#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
+	return now();
+#elif defined(__SAM3X8E__) || defined(__SAM3X8H__)
+	tmElements_t tm;
+	if (RTC.read(tm)) {
+	    return makeTime(tm);
+	}
+#endif
+	return 0;
+}
+
 //////////
 // Dive //
 //////////

					}
				} else {
					//No dive progress - reset the dive timestamp
					diveStartTimestamp = now();
				}
			}
			break;

			diveResult = buhlmann.initializeCompartments();

			lastDiveData = lastDive.loadLastDiveData();

			if (lastDiveData != NULL && lastDiveData->diveDateTimestamp > 0 ) {

			    Serial.print(F("Now timestamp: "));
			    Serial.println(nowTimestamp());
				Serial.print("Last dive timestamp: ");
				Serial.println(lastDiveData->diveDateTimestamp);

				//Calculate surface interval
				surfaceIntervalInMinutes = (nowTimestamp() - lastDiveData->diveDateTimestamp) / 60;

				Serial.print("Surface interval (min): ");
				Serial.println(surfaceIntervalInMinutes);
