
99 So.2d 282 (1957)
Raymond E. TILGHMAN, Petitioner,
v.
R.O. CULVER, as State Prison Custodian, Respondent.
Supreme Court of Florida.
December 18, 1957.
*283 Raymond E. Tilghman, in pro. per., for petitioner.
Richard W. Ervin, Atty. Gen., and Reeves Bowen, Asst. Atty. Gen., for respondent.
DREW, Justice.
Petitioner Raymond E. Tilghman challenges the legality of his retention under a fifteen year sentence for conviction of breaking and entering a store with an intent to commit a felony, and under a five year sentence for contempt of court which is to begin at the expiration of the fifteen year sentence.[1]
On October 22, 1954 petitioner entered a plea of guilty to the charge of breaking and entering a store with intent to commit a felony. On the same day the trial court sentenced him to serve ten years in the state prison.[2] Petitioner subsequently filed a petition for writ of habeas corpus in this court claiming that judgment on the above plea, entered after a former judgment for the same offense had been vacated by the federal district court, placed him in double jeopardy. This court held there was no double jeopardy, but agreed with petitioner that he "is entitled to receive full credit for the time which he served under his void sentence, along with the gain time which he earned, Perry v. Mayo, Fla., 72 So.2d 382, and that the trial court did not take all of this time into consideration." Tilghman v. Mayo, Fla. 1955, 82 So.2d 136, 137.
*284 The mandate of this Court ordered "that the writ heretofore issued must be, and it is hereby, quashed and the petitioner remanded to the sheriff of Polk County with directions to the trial court to vacate the sentence and upon resentence of the petitioner to take into account the time already served, plus his earned gain time." 82 So.2d 137.
In an attempt to comply with the order of this Court mentioned above, the trial court entered the following sentence on August 22, 1955:
"Thereupon the Court being of the opinion that no legal cause has been shown why sentence should not be passed at this time, it is now, therefore, the judgment of the law and the sentence of the Court that you, Raymond E. Tilghman be taken into custody by the Sheriff of Polk County, Florida, and be by him delivered to the proper authorities at the State Penitentiary at Raiford, Florida, where you are to be confined at hard labor for a term of fifteen (15) years,
"It further appearing from the records of this Court that the defendant Raymond E. Tilghman, subsequent to the time that he was remanded to the custody of the Sheriff of Polk County did on July 15, 1954, escape from the said custody and was not returned to custody of the said Sheriff until September 17, 1954, and the Court wishing to comply with the terms of the order of the Supreme Court filed on July 22, 1955, but not being able under the circumstances to determine the amount of time previously served by this defendant in connection with the sentences heretofore imposed in this case and further having no way of determining whether or not the said defendant is entitled to any earned gain time, and if so, the extent thereof,
"It is therefore Ordered that in the serving of this sentence that you, the defendant Raymond E. Tilghman, be given credit by the authorities at the State Prison at Raiford, Florida, for the time previously served under the sentences heretofore imposed by the Court in this cause, plus any earned gain time to which you may be entitled under the circumstances."
This is the fifteen year sentence under which the petitioner is now held.
Petitioner's argument is summarized in his own words as follows:
"Wherefore, petitioner respectfully prays that this Honorable Court issue an order voiding the five year sentence for contempt of court imposed by Judge Roy H. Amidon on December 9, 1955, and issue an order directed to Judge Amidon to vacate the 15 year sentence imposed on August 22, 1955, and resentence the petitioner to some term not exceeding 10 years according to the agreement and promises made on October 22, 1954, or issue an order ruling petitioner has served all lawful sentences that could be imposed under the circumstances, and order petitioner discharged from this illegal detention, or issue an order permitting petitioner to withdraw the plea of guilty that was entered under duress and promises on October 22, 1954 and enter a plea of not guilty and go to trial on the merits."
In the 1954 sentence which was previously reviewed by this Court, the trial judge attempted to give credit for over four years of time served under the void sentence, but did not give credit for gain time. (See footnote 2.) He had previously determined the sentence he believed petitioner should serve, after the conviction of petitioner in 1950 in a jury trial; but upon finding this to be in excess of the amount allowable for the crime, he reduced the sentence to 15 years. Although the judgment was subsequently vacated because the trial was unfair, there is no indication that the fifteen year sentence was *285 not a proper term. The trial judge's subsequent action on the plea of guilty appears to reflect a reasserted attempt by him to sentence petitioner to serve the equivalent of the originally imposed fifteen year term, by directing a ten year term to begin as of a time which was approximately four years later than the original sentence.
Petitioner's crime is delineated in § 810.02, Florida Statutes, F.S.A., which provides a fifteen year maximum sentence, and this Court has repeatedly refused to reduce sentences which have been imposed within the maximum allowed by statute. e.g. Hutley v. State, Fla. 1957, 94 So.2d 815; Emmett v. State, Fla. 1956, 89 So.2d 659; LaBarbera v. State, Fla. 1953, 63 So.2d 654; Walker v. State, Fla. 1950, 44 So.2d 814. Even if the relevant statements of the trial judge and his pattern of sentencing are ignored under a highly technical view of "sentence"; we find that it is possible for the trial judge on resentencing to impose a greater sentence than he imposed before. See State ex rel. Rhoden v. Chapman, 1937, 127 Fla. 9, 172 So. 56. For the above reasons we will not disturb the fifteen year term of which petitioner now complains.
The situation, which involves sentencing the defendant after he has already been imprisoned in connection with the same crime under a void judgment and maintained in custody for purposes of proper judgment is different from an original sentencing situation.[3] Here, the trial court was required to take into account imprisonment suffered under the prior void sentence. This means that the term yet to be served, plus the prior served time (with the addition of gain time earned for this period[4]) must not exceed 15 years. It was not clear to this Court in petitioner's last appearance here that the 10 year sentence imposed on October 22, 1954 met the above requirements. However, the resentence entered by the trial court on August 22, 1955 is within the terms of the mandate of this Court issued in Tilghman v. Mayo, supra. The trial judge properly directed the prison authorities to credit petitioner with time served and earned gain time. He was not authorized to actually compute gain time, since that is within the discretion of prison officials under the circumstances of this case, § 954.06, Florida Statutes, F.S.A.; and he properly excluded from petitioner's credit the time petitioner was an escapee. Finch v. Mayo, Fla. 1955, 79 So.2d 770.
The sentencing method adopted in State v. Nelson, 1948, 160 Fla. 744, 36 So.2d 427, and generally followed by the trial court in this case, is calculated to inform the prison authorities and the prisoner of his probable release date; and as mentioned before, the circumstances are different from those before this Court in McMahon v. Mayo, supra. The trial court stated the over-all imprisonment term, and then attempted to make the situation clear by showing that service under the term began de facto at the time of the first commitment for breaking and entering. Gain time should be computed as if there had been a continuous period of service for the length of time actually served. Since the record does not show any release on bail or other lapse of custody during the relevant period, the only time for which no credit can be given is the time spent out of custody on escape. We cannot accept the custodian's theory that certain time petitioner was in custody was not a valid credit because it was not served under a sentence,  but was served after the first commitment, without color of the void judgment, and after the judgment on plea of guilty, upon release to Polk County authorities for resentencing. It was not petitioner's fault that the state's criminal system failed to judge him guilty and sentence him properly in an uninterrupted operation. Under the circumstances of this case it is only fair to give petitioner full *286 credit for all time he has been in official custody since the time of his first commitment under the breaking and entering charge in 1950. This type of sentence is a recognition of the prisoner's right to pay his debt to society by one continuous period of imprisonment, unless he acquiesces in some manner in an interruption of custody. See, State ex rel. Libtz v. Coleman, 1941, 149 Fla. 28, 5 So.2d 60.
According to the record before us the trial judge admits that he bargained with the petitioner and reached an agreement whereby the petitioner was to plead guilty to the breaking and entering charge in exchange for a particular sentence by the judge. This fact sets this case apart from the many other cases on the point where the evidence does not prove such promises or inducements. If petitioner had asked for an opportunity to withdraw his plea within a reasonable time after making it, coupled with an offer to proceed to trial immediately, many cases hold that he should have the right to withdraw his guilty plea. e.g. Rubenstein v. State, Fla. 1951, 50 So.2d 708; also see, Shoemaker v. Mayo, Fla. 1954, 75 So.2d 690. However, whether a guilty plea may be withdrawn or not presents a matter in the sound discretion of the trial court, but subject to review by the appellate court, e.g. Casey v. State, 1934, 116 Fla. 3, 156 So. 282. There is no valid reason for allowing this petitioner to withdraw his plea of guilty; since he raises the question at such a late time, in habeas corpus proceedings, and after he had been given an opportunity by the trial court to withdraw his plea of guilty, but refused to do so.
Courts cannot bind themselves to agreements such as that shown by this record. To countenance such would require too high a price for administrative efficiency. The judge is an instrument of the law charged with meting out just punishment to convicted men. Just punishment is that which fits the circumstances of the crime and the particular criminal; therefore, expediency has no place in formulating the judge's act.
Having concluded that the prisoner is lawfully in the custody of respondent, he cannot now, in these proceedings, question the validity of the five year sentence for contempt of court. Finch v. Mayo, supra; Hitson v. Mayo, Fla. 1955, 82 So.2d 591. In reaching this conclusion we express no views as to the validity of this unusually long sentence and expressly hold that this opinion and judgment is without prejudice to the defendant to question the contempt sentence at the proper time.
The petitioner is remanded to the respondent to serve the sentence under which he is being detained as herein construed.
TERRELL, C.J., and THOMAS, ROBERTS and THORNAL, JJ., concur.
NOTES
[1]  Petitioner was convicted of breaking and entering a store with intent to commit a felony on June 15, 1950, and on that date was sentenced to serve a term of 20 years in the state prison. On appeal, the judgment of conviction was affirmed in Tilghman v. State, Fla. 1951, 51 So.2d 785. The trial court subsequently reduced the sentence to 15 years, on application of petitioner, and this order was affirmed in Tilghman v. State, Fla. 1953, 64 So.2d 555. On February 23, 1954 by habeas corpus proceedings in the United States District Court the judgment was vacated and petitioner was returned to the state court for prosecution, since the state conceded that insufficient notice of trial resulted in deprivation of petitioner's right to obtain counsel. Petitioner escaped from the Polk County jail while awaiting retrial on July 15, 1954 and voluntarily returned, September 17, 1954.
[2]  The trial court entered sentence on October 22, 1954 as follows:

"The defendant Raymond Tilghman having come into Court on this date with his attorney, Frank McClung, and withdrawn his plea of not guilty previously entered herein and entered a plea of guilty, and it appearing to the Court from the files herein and the Court knowing of its own knowledge, having presided throughout the time this case was dealt with in this Court, that the defendant was on June 15, 1950, by the verdict of the jury found guilty of the crime of breaking and entering with intent to commit a felony and sentenced to serve twenty years in the State Prison, and that on August 6, 1952, he was again brought before the Court and the sentence amended to a term of fifteen years in the State Prison, and that the defendant has served over four years of said sentence prior to the time that same was set aside by the Federal Court; and the Court therefore taking into consideration the fact that he has previously served over four years; and the Court having adjudicated the defendant guilty of the charge of breaking and entering with intent to commit a felony based on his plea of guilty thereto,
"It is now therefore the judgment of the law and the sentence of the Court that you, the defendant, Raymond Tilghman be taken into custody by the Sheriff of Polk County, Florida, and by him delivered to the proper authorities at the State Penitentiary, at Raiford, Florida, you there being confined at hard labor for a term of ten (10) years."
[3]  For the latter, see McMahon v. Mayo, Fla. 1957, 92 So.2d 806.
[4]  See § 954.06, Florida Statutes, F.S.A.
