Thin film deposition with time-varying temperature