[PD] counting elapsed samples