 		tone(speakerPin, acceptNote, acceptDuration);
 	}
 }
+
+unsigned int calculateTime(unsigned int startTime) {
+	return (millis() - startTime)/1000;
+}
	if (elapsedTime > 0) {
		sendCommand(CMD_WRITE, blockID, machineID, keyA, elapsedTime + existingTime);
		delay(waitforWriteResponse);
		responseFlag = getResponse(readData);
		if (!responseFlag) {
			Serial.print(messages.errorRead);
		}
		else {

	const int quota = 3600;
	const int sendInterval = 15000;
	// some variables
	bool isValidResponse = false;
	unsigned int userID = 0;
	unsigned long existingTime, elapsedTime = 0;
	unsigned char readData[bufferSize];
