
908 A.2d 124 (2006)
PETER H. REIGER
v.
STATE OF MARYLAND.
No. 0766, September Term, 2005.
Court of Special Appeals of Maryland.
Filed: September 22, 2006.
Hollander, Adkins, Sharer, JJ.
Opinion by ADKINS, J.
Appellant Peter H. Reiger challenges the legality of his 30 year sentence for second degree murder, raising a single issue on which this Court granted leave to appeal:
Whether the sentencing court, by considering the action the parole board might later take, relied on an impermissible criteria in setting the sentence?
We shall hold that Reiger waived his objection by failing to assert it at sentencing. In any event, we conclude there was no error, because a court may consider parole eligibility and good conduct credits in imposing sentence.

FACTS AND LEGAL PROCEEDINGS
Reiger was convicted of bludgeoning his mother to death. After neighbors noticed newspapers piling up outside the home where both Reigers lived, police discovered appellant inside, in an incoherent state of intoxication, while his mother lay dead in her bedroom. Although Reiger could not recall all of the events leading up to his assault, he recalled that he became mad at her and struck her 20 or 30 times. Reiger has a black belt in one of the martial arts.
Reiger pleaded nolo contendere to second degree murder, which carries a maximum penalty of 30 years imprisonment. Reiger's lack of any prior record, advanced alcoholism, education and employment as a certified architect, lack of danger to others, and the vulnerability of the victim were factored into the pre-sentence report. The State argued that, although the sentencing guidelines were 12 to 20 years, the maximum 30 year sentence should be imposed.
Before accepting Reiger's plea, the Circuit Court for Montgomery County determined that Reiger understood the maximum sentence and that there could be no agreement binding the court with respect to sentencing. The court imposed the maximum sentence of 30 years. The following remarks by the sentencing court give rise to this appeal:
Now I will tell you that the Court's sentence is going to include a recommendation to the Patuxent Institute. . . . I will tell you that the sentence the Court is going to impose is above the sentencing guidelines, and I will tell you why. Your lawyer will tell you this. The State certainly knows. The number imposed does not mean the number imposed. We know that. If you give a person X number of years, they're not going to do X number of years, and that's not a criticism of the system. That is an explanation of the components of our correctional system. For example, a five-year sentence, for example, doesn't mean five years. The person's going to do about two and a half years. And so in considering what an appropriate punishment is, whether the Court should do it or shouldn't, the Court considers the amount of time that the Court finds the person actually would serve, and adjusts the sentence accordingly. Because I know that a defendant who goes out of this courtroom and into the Department of Corrections, except in those cases where a sentence is mandatory, and this is not that case, . . . the person doesn't serve the number of years that the Court imposes, and that's because of good time. (Emphasis added.)
Reiger will become eligible for parole at some point after he serves the portion of his sentence required by Md. Code (1999, 2005 Cum. Supp.), section 7-301(c) of the Correctional Services Article (CS), which provides that an inmate convicted of a violent crime is not eligible for parole until he or she serves at least half of the aggregate sentence for the violent crime.

DISCUSSION
The sentencing court has "virtually boundless discretion" in imposing a sentence. See State v. Dopkowski, 325 Md. 671, 679 (1992). Consequently, "[a] trial judge may impose any sentence not in violation of constitutional requirements or statutory limits, so long as it is not motivated by ill-will, prejudice or other impermissible considerations." Douglas v. State, 130 Md. App. 666, 677-78 (2000). The "extremely limited" grounds upon which criminal sentences may be appealed include "whether the sentencing judge was motivated by . . . impermissible considerations." See Jackson v. State, 364 Md. 192, 200 (2001); Teasley v. State, 298 Md. 364, 370 (1984).
Reiger argues that the court impermissibly considered his parole eligibility when it imposed the maximum sentence of 30 years in lieu of a shorter term within the range calculated under the sentencing guidelines. According to Reiger, the sentencing court interfered with the Parole Commission in the exercise of its executive clemency function, by selecting a sentence that is calculated to limit and defeat anticipated actions of the Parole Commission.

I.

Waiver Of Impermissible Sentencing Consideration Claim
The State contends that Reiger's failure to object at sentencing, and the facial legality of the sentence, mean that his impermissible sentencing consideration claim is not preserved for appellate review. Md. Rule 4-323(c) governs objections to non-evidentiary rulings:
For purposes of review . . . on appeal of any other ruling or order, it is sufficient that a party, at the time the ruling or order is made or sought, makes known to the court the action that the party desires the court to take or the objection to the action of the court. The grounds for the objection need not be stated unless these rules expressly provide otherwise or the court so directs. If a party has no opportunity to object to a ruling or order at the time it is made, the absence of an objection at that time does not constitute a waiver of the objection.
"If there is an opportunity to object to a ruling or order when it is made, the failure to do so (and to inform the court of the relief requested) may constitute waiver." Hill v. State, 355 Md. 206, 219 (1999)(emphasis omitted).
In Brecker v. State, 304 Md. 36, 39-41 (1985), the defendant's failure to object at sentencing on the ground he later raised on appeal prevented appellate review. Although the defendant contested the amount of restitution ordered by the court, he did not object that the court failed to inquire about his ability to pay. The Court of Appeals held that, "in accordance with 'well settled' Maryland law, appellant is considered to have waived the point he now argues." Id. at 40 (citation omitted). See also Simms v. State, 65 Md. App. 685, 692 (1986)(noting that challenge based on sentencing court's failure to consider ability to pay restitution "may have been waived" by failure to object).
In Towers v. Director, Patuxent Institute, 16 Md. App. 678, 682-83 (1973), this Court considered whether an objection was necessary to preserve the defendant's right to appeal on the ground that the sentencing judge improperly considered a prior conviction that was unconstitutional. We held that the rule requiring contemporaneous objection to the admission of evidence at trial applied equally in the penalty phase. See id. "If timely objection is not made below to the consideration by the sentencing judge of a prior conviction, the question of its propriety is not preserved for appeal." Id. at 683.
In Saenz v. State, 95 Md. App. 238, 241 n. 1 (1993), we recognized that it was "doubtful" that the defendant's improper sentencing consideration challenge was preserved for appellate review. Nevertheless, as the State acknowledges, this Court in Douglas, observed in dictum that it is "unclear whether an objection to the trial judge's consideration of an impermissible factor is waived if the objection is not made at the time of sentencing." Douglas, 130 Md. App. at 677.
Reiger argues that no objection was necessary in these circumstances. In his view, this waiver issue was resolved by Walczak v. State, 302 Md. 422, 427 (1985), in which the Court of Appeals held "that when the trial court has allegedly imposed a sentence not permitted by law, the issue should ordinarily be reviewed on direct appeal even if no objection was made in the trial court." Reiger also relies on Passamichali v. State, 81 Md. App. 731, 745 n. 4, cert. denied, 319 Md. 484 (1990), in which we questioned whether an appellant's improper sentencing consideration challenge could be distinguished from challenges to illegal sentences and whether an objection should be necessary. As Reiger reads them, Walczak and Passamichali collectively mean that a defendant need not lodge a contemporaneous objection to the sentencing court's consideration of improper evidence or impermissible factors in order to preserve his right to appellate review of that sentence.
We hold that an objection is required to prevent waiver in these circumstances. Reiger's reliance on Walczak is misplaced. The Court of Appeals has distinguished between errors by a sentencing court that result in an otherwise lawful sentence, and errors that inhere in the sentence itself. See State v. Wilkins, 393 Md. 269, 274 (2006); Baker v. State, 389 Md. 127, 133 (2005). Only the latter type of error renders the sentence illegal. See Baker, 389 Md. at 133. Thus, a claim that "a sentencing judge was motivated by impermissible considerations. . . . does not render the sentence illegal within the meaning of Rule 4-345." Randall Book Corp. v. State, 316 Md. 315, 322-23 (1989). For this reason, the Walczak holding that an objection is not necessary to preserve the right to appeal an illegal sentence does not apply to impermissible sentencing consideration claims like Reiger's.
We recognize that this case differs from Towers because it involves failure to object to the sentencing court's consideration of impermissible factors rather than its consideration of improper evidence (i.e., the unconstitutional prior conviction in Towers). This case also differs from Brecker, which addressed the sentencing court's failure to consider evidence deemed by statute to be essential (i.e., defendant's ability to pay restitution). We conclude, however, that the same waiver rules and rationales govern all of these situations.
When, as in this case, a judge's statement from the bench about the reasons for the sentence gives rise to the claim of impermissible sentencing considerations, defense counsel has good reason to speak up. A timely objection serves an important purpose in this context.[1] Specifically, it gives the court opportunity to reconsider the sentence in light of the defendant's complaint that it is premised upon improper factors, or otherwise to clarify the reasons for the sentence in order to alleviate such concerns. See Md. Rules 4-342, 4-345. As recognized in the rule, it is the availability of an opportunity to ask for and obtain immediate relief from the sentencing court that determines whether a contemporaneous objection is necessary. Simply stated, when there is time to object, there is opportunity to correct. Cf. Graham v. State, 325 Md. 398, 411 (1992)(defense counsel had adequate time to object to trial court's failure to disclose entire contents of jury's note and waived right to appeal on that point by failing to do so).
The record here reveals that Reiger had ample opportunity to object to the sentencing court's allegedly impermissible consideration of parole or good conduct credits. The comments challenged by Reiger were all made well before the court announced the actual sentence. Indeed, after the court completed the challenged comments, it went on to talk about why it intended to recommend that Reiger serve his sentence at Patuxent Institution and why Reiger would do well there. Defense counsel could readily have argued to the court that it would be error to consider that Reiger might not actually serve all of the years of the sentence imposed by the court.
We recognize that there are situations in which defense counsel will be reluctant to interpose an objection out of an abundance of caution that it might affect the sentence about to be imposed. In this case, however, it is clear from the record that appellant's attorney had ample opportunity to do so without running the risk of offending the court. Moreover, the defendant did not make this objection after the court ruled at the hearing, or on motion for reconsideration. Under these circumstances, the issue was not preserved.
We hold that Reiger waived his impermissible sentencing considerations challenge by failing to object at sentencing. In order to avoid an ineffective assistance of counsel claim, however, we shall not rest our decision solely on waiver. See Towers, 16 Md. App. at 683-84 (recognizing that attorney's failure to object to sentencing court's consideration of unconstitutional prior conviction could be ineffective assistance of counsel). For the reasons set forth below, we also conclude that there was no error in sentencing.

II.

Sentencing
Reiger cites DeLeon v. State, 102 Md. App. 58 (1994), and Simms v. State, 65 Md. App. 685 (1986), in support of his contention that the court improperly used its sentencing power to restrict the possibility of his parole. In DeLeon, this Court explained that
[i]t is not an inherent part of the judicial sentencing function to regulate in any fashion the eligibility of a convicted prisoner for parole. Except in those limited circumstances when the Legislature has expressly empowered the court to impose no-parole provisions under certain very specifically designated circumstances, the parole function is exclusively within the control of the executive branch of government.
DeLeon, 102 Md. App. at 73. In Simms, we held that any attempt by a court to impose restitution as a condition of parole also usurps the constitutionally separate executive function of the Parole Commission. See id.; Simms, 65 Md. App. at 691-92.
We find DeLeon and Simms inapposite. DeLeon's sentence was vacated because it included an order that required five years of his conspiracy sentence to be served without parole. See DeLeon, 102 Md. App. at 77. We held that, in the absence of statutory authority, a sentencing court has no power to impose, as part of a sentence, a time restriction on the Parole Commission's discretionary authority. See id. at 75. In Simms, we held that the sentencing court erred by placing a financial condition on the Commission's authority to grant parole. See Simms, 65 Md. App. at 691.
Here, there is no analogous time or monetary condition on the Commission's exercise of authority. The sentencing court did not impose any restriction on parole. We are not persuaded otherwise by Reiger's complaint that, in imposing the maximum sentence, the court tacitly attempted to restrict parole by preventing Reiger from becoming eligible for it. Under Md. Code (1999, 2005 Cum. Supp.), section 7-301(c) of the Correctional Services Article (CS), Reiger will not be eligible for parole until he serves half of his 30 year sentence for this violent crime.[2] But it is the statute itself that ties parole eligibility to the specified portion of the time served, not the judge.
Section 7-301 establishes when a person convicted of a violent crime will be eligible for parole, and that the authority to grant parole rests with the Parole Commission, an arm of the executive branch. There is nothing in section 7-301, or other statutory provisions relating to parole, suggesting that the legislature intended the Parole Commission to trump the judge in determining the length of a sentence. See, e.g., Woods v. Steiner, 207 F. Supp. 945, 952 (D. Md. 1962)("The Maryland legislature has not delegated to the Board of Parole and Probation the judicial function of imposing punishment for crime. Rather, the Board has been given the duty of administering and supervising this punishment"). Moreover, the Parole Commission deals with the prisoner and the sentence as determined by the judge:
The purpose of parole legislation is to permit a deserving prisoner to leave prison before the expiration of his term and to serve out its balance while living in the community. Parole is an extension of the prison walls, an institution intended to achieve maximum prisoner rehabilitation at a minimal cost to the state.
Id. at 951. See also Patuxent Inst. Bd. of Review v. Hancock, 329 Md. 556, 573 (1993)("The purpose of parole is to help individuals reenter society and to alleviate the costs to society of keeping an individual in prison").
Moreover, there was legitimate reason for the court to consider parole eligibility in sentencing Reiger. A defendant's parole eligibility date is relevant, without regard to whether parole will ever be granted, because it allows the court to determine the defendant's minimum period of incarceration. Assessing what length of time a defendant should be incarcerated for the crime he committed lies at the very heart of the court's constitutional duty to sentence. Consequently, we agree with the decisions holding that it is not error for a sentencing court, in determining an appropriate period of incarceration, to merely recognize the predictable date upon which the defendant would become eligible for parole under a given sentence. See, e.g., Louisiana v. Clayton, 570 So. 2d 519, 528 (La. Ct. App. 1990)("In formulating a particular sentence, the trial judge may take parole eligibility into account"); Richburg v. Mississippi, 724 So. 2d 444, 448 (Miss. 1998)(sentencing judge had authority to consider possibility of parole in determining appropriate sentence for assault); Nebraska v. Cadwallader, 434 N.W.2d 506, 510 (Neb. 1989)(sentencing court may consider effect of parole upon sentence imposed); State v. Wilkins, 254 S.E.2d 598, 604 (N.C. 1979)(sentencing court may consider mere parole eligibility); Akins v. Oklahoma, 523 P.2d 1111, 1114 (Okla. Ct. Crim. App. 1974)(although state rule prevents jury from considering parole or good time credits in deliberating verdict, trial judge may consider both in imposing sentence); Wisconsin v. Stuhr, 284 N.W.2d 459, 461 (Wis. Ct. App. 1979)("It is . . . proper for a trial court to consider parole eligibility in imposing sentence"); cf. Jackson, 616 P.2d at 24-25 ("we do not suggest that parole considerations are irrelevant in fashioning a sentence"); Lohnes, 344 N.W.2d at 689 ("it may be permissible for a trial judge to consider parole eligibility in sentencing").[3]
Judge Northrop, a Maryland federal judge applying Maryland law, recognized that Maryland judges generally consider parole in imposing sentences:
The responsibilities of sentencing weigh heavily upon a judge; he considers with great caution and care the impact that his sentence will have upon the life of the person upon whom sentence is to be imposed. And the possibility of parole is one matter that never eludes his attention. Just as it is so often uppermost in the mind of the prisoner, so is it in the mind of the judge. In legal contemplation, the terms of the apposite parole statutes are implicit  and, oftentimes, quite explicit  in the pronouncement of sentence. Federal judges, as must be the judges of Maryland, are fully aware that a sentence they impose might be interrupted by parole[.]
Woods, 207 F. Supp. at 949-50.
We agree with the Nebraska court's reasoning in Cadwallader: In fixing the term of imprisonment, a trial court has a number of matters to consider. The sentence should be such as to provide some deterrence; of sufficient length to at least afford a possibility of rehabilitation; of sufficient severity so as not to depreciate the seriousness of the crime; and, in a proper case, such as to provide some measure of protection to society by removing the offender temporarily from society. It would be strange to think that a sentencing judge could make a decision as to a proper term of imprisonment if no consideration were given to the various factors that determine how much of a particular sentence must be served before the prisoner can be released.
Cadwallader, 434 N.W.2d at 510.
As long as the sentencing court does not impose restrictions on the grant of parole, the court has discretion to consider the effect of non-discretionary statutes governing parole eligibility. We agree with the State that a contrary rule would be "akin to asking judges to exercise deliberate oblivion." See, e.g., Abernathy, 259 N.E.2d at 368 ("A sentencing judge cannot be expected to disregard the parole possibilities attached to his sentence, although this knowledge should not be his guiding criterion in imposing sentence"); Akins, 523 P.2d at 1114 ("It would create quite a dilemma to charge the trial judge with the duty of knowing the provisions [governing parole eligibility] and then on the other hand hold that it is not a proper consideration in his imposing punishment. To establish such a requirement would create a situation which is humanly impossible"); Stuhr, 284 N.W.2d at 461 ("To hold otherwise would be to require judges to disregard the effect of the sentences they impose"). For the same reasons, it was appropriate for the court to consider good time credits.[4]See, e.g., Cadwallader, 434 N.W.2d at 510 (sentencing court may consider effect of good time credits upon sentence imposed); Akins, 523 P.2d at 1114 (judge may consider good time credits in imposing sentence).
Here, the court imposed the maximum sentence of 30 years, without interfering with the Parole Commission's discretion to grant parole in accordance with CS section 7-301(c). The sentencing judge's remarks indicate that he determined the appropriate term of incarceration to be at least 15 years, to as much as 30 years, depending upon Reiger's behavior and progress. The court undisputedly had authority to impose an above-guidelines sentence. See Jennings v. State, 339 Md. 675, 680 n. 1 (1995); Teasley, 298 Md. at 370.

Conclusion
Even if Reiger had not waived his impermissible sentencing considerations claim by failing to object at sentencing, the court did not improperly restrict the Parole Commission's authority. Nor did it err in considering Reiger's good conduct credits. We shall affirm the sentence.
JUDGMENT AFFIRMED. COSTS TO BE PAID BY APPELLANT.
NOTES
[1]  In Passamichali v. State, 81 Md. App. 731, 745 n. 4, cert. denied, 319 Md. 484 (1990), we noted that, even if a sentence based on improper consideration is merely "defective," rather than illegal, such a defect "ought to be reviewable even if there was no immediate objection, because when it occurs it is too late to object." This case differs from Passamichali because that judge made no announcement of the allegedly impermissible consideration, which would have given the defendant an opportunity to object.
[2]  Md. Code (1999, 2005 Cum. Supp.), section 7-301 of the Correctional Services Article provides in pertinent part:

(c)(1)(i) Except as provided in subparagraph (ii) of this paragraph, an inmate who has been sentenced to the Division of Correction after being convicted of a violent crime committed on or after October 1, 1994, is not eligible for parole until the inmate has served the greater of:
1. one-half of the inmate's aggregate sentence for violent crimes; or
2. one-fourth of the inmate's total aggregate sentence.
[3]  We do not decide whether our decision would be different if the sentencing judge speculated that a defendant were to be paroled on a specific date and sentenced on that particular basis. See, e.g., Jackson v. Alaska, 616 P.2d 23, 24-25 (Alaska 1980)("[T]he assumption that an offender will be paroled on a particular date is, at best, speculative. If a sentence were adjusted to reflect such an assumption, but the offender not released as 'scheduled,' the full service of a clearly excessive sentence might result"); South Dakota v. Lohnes, 344 N.W.2d 686, 689 (S.D. 1984)("the assumption that an offender will be paroled on a particular date is, at best, speculative'")(citation omitted). The sentencing court in Jackson, in imposing an original fifteen year sentence,

voiced its expectation that Jackson, given credit for good time served, might be eligible for and released on parole after only two years in jail. "I am also compelled to say that two years additional to what you have already served is a small enough penalty to pay for what happened." The court reduced the sentence to ten years but continued to emphasize parole considerations. ". . . I don't expect him to serve half of the sentence . . . I suspect he's going to be . . . released on parole sometime during the first half of the sentence and that's what I base my decision on."
Jackson, 616 P. 2d at 24 n. 2.
[4]  Good conduct credits differ from parole in that they are granted by statute, not by the Parole Commission. See CS § 3-704. These diminution credits accrue upon conviction and are deducted in advance from an inmate's term of confinement, at statutorily prescribed rates depending on the nature of the crime for which the sentence has been imposed. See id. Thus, good conduct credits exist from the outset of the sentence in a calculable amount, without regard to whether the defendant will be paroled.
