Dimension via waiting time and recurrence