how to create buffer for elapsed time ??