
742 So.2d 345 (1999)
Robert T. NOWELL, Appellant,
v.
STATE of Florida, Appellee.
No. 98-3131.
District Court of Appeal of Florida, Fifth District.
August 6, 1999.
Robert T. Nowell, Raiford, pro se.
Robert A. Butterworth, Attorney General, Tallahassee, and Ann M. Phillips, Assistant Attorney General, Daytona Beach, for Appellee.
THOMPSON, J.
Robert T. Nowell, pro se, appeals the judgment and sentence rendered after revocation of his probation. He argues that he was not given proper credit for time he served in the Polk County jail awaiting return to Volusia County after his arrest, or for time spent in Reality House. Reality House is an inpatient drug treatment *346 program which Nowell contends was the functional equivalent of jail. We affirm.
Nowell first alleges that he is entitled to five days credit for time he spent in the Polk County Jail after he was arrested on a Volusia County warrant. Although the record does show that he was in the Polk County Jail, this is the first time that Nowell has complained about credit for time served. Florida Rule of Appellate Procedure 9.140(d) provides that a sentencing error may not be raised on appeal unless it was first brought to the attention of the lower tribunal at the time sentence is imposed, or by a motion pursuant to Florida Rule Criminal Procedure 3.800(b), which has a deadline of thirty days after rendition of the sentence. Nowell did not raise the issue of credit for time served at the time of sentencing, nor did he file a 3.800(b) motion.
Second, Nowell contends that he should receive jail-time credit for the 89 days he spent at Reality House, a drug treatment program, because it was the functional equivalent of county jail. In Tal-Mason v. State, 515 So.2d 738 (Fla. 1987), the Florida Supreme Court held that to be held against one's will in a state mental institution for incompetence is the functional equivalent of being held in the county jail. Id. at 740. The court reasoned that if a defendant can be given jailtime credit for time spent in a hospital or other health-related facilities for physical injuries, then a defendant should be given jail-time credit for time spent in a mental institution. Id. The test is whether the stay in the facility constitutes a coercive deprivation of liberty. Id. at 739. The court specifically rejected giving jail-time credit for time spent in a live-in drug rehabilitation program. Id. at 739 (citing Pennington v. State, 398 So.2d 815, 817 (Fla.1981)). The court noted that probationary rehabilitation, where the defendant and the court contract for the conditions of probation, is different from coercively depriving a defendant of his liberty.
The record in this case refutes Nowell's argument that his stay in Reality House was coercive. Nowell, initially arrested for possession of cocaine, requested placement in a drug treatment program to deal with his substance abuse. Instead of being adjudicated and sentenced to 180 days in the county jail, Nowell agreed to three years probation with the first six months in an inpatient drug treatment program. The trial judge told Nowell, "You mess up, you get axed." Nowell replied that he needed "the regimented lifestyle to start me off." Nowell then agreed to waive his guideline sentence, and the trial court told him that if he violated the conditions of his probation, he could be sentenced to five years in the Department of Corrections. During the last part of his stay at Reality House, Nowell requested and obtained a pass to travel to a job interview. He was not accompanied by staff or by law enforcement. His purpose was to obtain a job so he could complete the final phase of his treatment program, but he failed to return to the facility. Nowell contracted with the court to participate in a drug treatment program but failed to follow the conditions of the program. Because his stay at Reality House was neither coercive nor custodial, he is not eligible to receive jail-time credit. See Pennington at 817. We affirm the sentence in its entirety.
AFFIRMED.
COBB and HARRIS, JJ., concur.
