Tesla CEO Elon Musk thinks that Apple will eventually be a "direct" competitor when it comes to cars, but he also says the company started too late.

"I think it's great that they're doing this, and I hope it works out," he said onstage at Vox Media's Code Conference on Wednesday night.

When asked what he thought Apple's time frame would be, he said Apple seemed to have missed an opportunity to start earlier.

"I think they should have embarked on this project sooner," he said. "But I don't know when -; they don't share with me the details of their production plans. I don't think they'll be in volume production until 2020."

He said earlier that Tesla wanted to be making a million cars a year by then.

"It's a missed opportunity" for Apple, he added.

Apple has not confirmed that it is working on a car, but Musk has previously said the company's plans are an "open secret" in Silicon Valley.

Musk said that while he thought Apple was a couple of years late to start, "they'll probably make a good car and be successful."

He doesn't see Google as a competitor, however.

"Google has done a great job at showing the potential of autonomous transport, but they're not a car company," he said. "We'd compete with someone that licensed their technology, maybe."