In all cases where any ordinance or this code requires any act to be done in a reasonable time or reasonable notice to be given, such reasonable time or notice shall be deemed to mean such time only as may be necessary for the prompt performance of such duty, or for compliance with such notice.