added auto-detection for time buffer