Easiest way is to put a entrance time stamp and exit time stamp of the buffer. Get the duration spent and in the EndSim or at the end of simulation the average. or total duration divided by no. of mus passed through the buffer.
Remember to rear control the Exit method. Let me know if you want the more details.
You can also create a smart buffer in the class objects and replicate it numerous times without having to write the whole thing multiple times. You can use that smartBuffer in other simulations too.