- call time() only once