A man who admitted to smoking methamphetamine with a 17-year-old girl will serve prison time after having his probation revoked twice.

Joshua Michael Hoyt, 32, was sentenced Wednesday in Albany County District Court to a four- to five-year prison sentence on the felony child endangerment conviction with credit for 381 days already served.

Hoyt will concurrently serve a six-month sentence on a misdemeanor wrongful taking or disposing of property charge. He will also have to pay any previously unpaid restitution or other fees.

Judge Jeffrey Donnell included a recommendation for Hoyt to participate in the intensive treatment program.

"This stuff is going to kill you sooner or later if you don't get it under control," Donnell told Hoyt. "A little bit of prison time is going to be the least of your problems if you don't deal with this."

Donnell noted Hoyt had a "long and tortured" history with the court, having been sentenced to four years of probation in April 2015 after admitting to smoking meth with a 17-year-old girl and the misdemeanor wrongful taking or disposing charge.

Hoyt violated the terms of that probation and was sentenced to serve the six-month jail sentence followed by the prison sentence. He was later released on probation and put into a treatment program.

But after 110 days in that program, Hoyt used methamphetamine and was subsequently discharged from the program.

"Mr. Hoyt is taking responsibility for his actions," said Vaughn Neubauer, Hoyt's defense attorney, in court Wednesday. "He knows he has to face the music."

Neubauer went on to ask Donnell to reduce the minimum and maximum numbers of Hoyt's sentence by one year, saying Hoyt did relatively well in treatment. Neubauer also asked that Hoyt be allowed to serve the six-month sentence and four- to five-year prison sentence concurrently.

Prosecutor Kurt Britzius objected to the reduction, saying "I don't think letting him off easy would do him any good."

But Britzius had no problem with the sentences running concurrently.

"Fact of the matter is, you were using again before you even finished," Donnell told Hoyt. "The bottom line is the problem is not resolved."