unsigned long start_time=millis(); //record start time
...
unsigned long delta_t = millis() - start_time; //the difference
unsigned long start_time=millis(); //record start time
...
unsigned long delta_t = millis() - start_time; //the difference