Add sampling interval function