how to create buffer for elapsed time ??

how can i store the elapsed time to buffer or array and after 20 or 50 iteration of communication print it on serial monitor