As free agency began at 12:01 a.m. Sunday, so did the clock on whether Kristaps Porzingis has a chance of receiving a contract extension this summer with the Knicks.

Porzingis can sign a $155 million extension July 6. But if there’s hope of any extension signed by October’s deadline, it won’t be so quickly.

The Knicks likely will have to wait — perhaps prudently — until he becomes a restricted free agent in 2019, when they can sign him and are allowed to exceed the cap. Everything being done this July is with an eye on next July, when they have major free-agent aspirations — Porzingis included.

Knicks president Steve Mills confirmed “we’ll be able to make room for a max guy” in 2019. In guaranteeing such, Mills is suggesting the difficulty in affording Porzingis his security now. Mills and general manager Scott Perry have resolutely declined comment on the subject.

Cap room for a max contract will be $33 million for a player such as point guard Kyrie Irving or Golden State’s Klay Thompson.

If the Knicks wait until 2019 to lock up Porzingis, when he’s a restricted free agent, it would give them $10 million more in cap room next summer, of which every penny may be needed to lure Irving.

If the Knicks don’t give Porzingis his extension, they project to have $22 million in cap space next summer, according to ESPN’s capologist Bobby Marks.

The difference could be made up by using the stretch provision on formerly exiled Joakim Noah. Starting Sept. 1, if the Knicks waive Noah under the provision, they gain another $12 million in 2019 cap space.

That adds up to $34 million in space — enough for Irving, Thompson or Kawhi Leonard, though not LeBron James’ max if he is free again in 2019.

If the Knicks give Porzingis his max extension this summer, they would go into 2019 with $12 million in space. Of course, Porzingis could agree to take less than the max to help the Knicks and still give him more money than he could ever imagine spending in Latvia.

However, a max extension puts major pressure to trade Courtney Lee’s contract ($12.2 million in 2018-19) by October to a club with cap space or a return of an expiring contract. In other words, the Knicks can’t take 2019 money back in a Lee salary dump.

So it is still possible, but not probable, to eke out enough 2019 max cap space with a Porzingis summer extension.

Lee will be 33 next season and owner of one of the least desirable contracts, expiring in 2020. The Knicks, sources indicate, will explore moving Lee as coach David Fizdale eyes a starting unit of Tim Hardaway Jr. at shooting guard and rookie Kevin Knox at small forward.

Lee, whom Fizdale does not consider a small forward, could be extraneous as the Knicks have bigger plans for second-year shooting guard Damyean Dotson and using Frank Ntilikina some at the 2.

However, doing a $155 million deal with Porzingis now is a risk. There’s no assurance the 7-foot-3 Latvian comes back the same player — or won’t get re-injured. Porzingis will be restricted, so they can match any offer in 2019 and trade him if he returns to an unhappy state.

The Knicks, though, are confident in his return to max health. Porzingis’ ACL tear, according to sources, didn’t do cartilage damage, making it less severe.

On the surface, Porzingis prefers to have $155 million secured now, but he also desperately wants the Knicks to build a winner by adding another superstar.

Mills said the formerly disgruntled Porzingis is “back on board,’’ claiming they have “rebuilt” the relationship, citing his draft-night FaceTime session with Knox and cheery social-media messages.

Mills also said he believes his brother/agent, Janis Porzingis, critical of the Knicks’ vision in the past, understands the goal.

“We let him understand what we’re doing as a team and where we’re taking this thing,’’ Mills said.

For now, the Knicks don’t need much in 2018 free agency — just deciding whether to attempt to get back Michael Beasley on a one-year deal or find his power-forward replacement. The Knicks still don’t have a starting power forward for the season opener with Porzingis out indefinitely.

Mills, who has been with MSG off and on since 2003, said he has it all under control with full support of owner James Dolan, who denied a report he’s selling after years of losing and flubbing decisions like hiring Phil Jackson.

“A year ago, Jim gave me the opportunity to lay out a plan as to what we needed to do to build this team into a winner into a long period of time sustainable winning, not reacting to the ups and downs, trying to make quick fixes,’’ Mills said. “We need to be committed to developing our players and growing our talent within. This is a talent game. We have to committed to growing the team in a sustainable way. Jim backed off, committed to give me the room to do that.”