
258 Wis.2d 351 (2002)
2002 WI App 289
655 N.W.2d 175
STATE of Wisconsin, Plaintiff-Respondent,
v.
George SCHERTZ, Defendant-Appellant.
No. 02-0789.
Court of Appeals of Wisconsin.
Submitted on briefs September 9, 2002.
Decided October 1, 2002.
*352 On behalf of the defendant-appellant, the cause was submitted on the brief of Barbara A. Cadwell, White Lake.
On behalf of the plaintiff-respondent, the cause was submitted on the brief of James E. Doyle, attorney general and Sally L. Wellman, assistant attorney general.
Before Cane, C.J., Hoover, P.J., and Peterson, J.
*353 ¶ 1. PETERSON, J.
George Schertz appeals from an order revoking his conditional release and remanding him to Winnebago Mental Health Institute. Schertz claims that because a hearing on the State's petition to revoke his conditional release was not held within thirty days of filing pursuant to WIS. STAT. § 971.17(3)(e),[1] the court lost competency. Because we conclude that § 971.17(3)(e) is directory rather than mandatory, we affirm the order.

FACTS
¶ 2. In November 1998, Schertz was charged with two counts of battery by an inmate in violation of WIS. STAT. § 940.20(1). He was found not guilty by reason of mental disease or defect, and the court ordered his conditional release.
¶ 3. On May 25, 2001, the State filed a statement of probable cause for Schertz's detention and a petition for revocation of his conditional release. The petition alleged that Schertz violated his conditions of release by drinking alcohol, being in a tavern and missing curfew at his residential placement. A hearing was held on June 25 where the trial court dismissed the petition because more than thirty days had passed since its filing, in violation of WIS. STAT. § 971.17(3)(e).[2]
*354 ¶ 4. On June 27, the State filed another petition for revocation alleging the same violations as the previous petition. Schertz moved for dismissal. On September 14 the trial court held that the thirty-day limit in WIS. STAT. § 971.17(3)(e) was directory and allowed the State to proceed. At an October 15 hearing, the court found that Schertz violated the terms of his conditional release and he was remanded to the Winnebago Mental Health Institute. Schertz appeals.

STANDARD OF REVIEW
[1, 2]
¶ 5. Whether a trial court has lost competency to act presents a question of law, which we review independently. State v. Kywanda F., 200 Wis. 2d 26, 32-33, 546 N.W.2d 440 (1996). Competency in this context means the court's power to adjudicate the specific type of controversy before it, and the court loses competency when it fails to comply with the requirements necessary for the valid exercise of that power. Green County DHS v. H.N., 162 Wis. 2d 635, 655-56 n.17, 469 N.W.2d 845 (1991).
[3, 4]
¶ 6. In this case, the issue is whether the thirty-day requirement in WIS. STAT. § 971.17(3)(e) is mandatory or directory. "Whether a statute is mandatory or directory is a matter of statutory construction and, as such, is a question of law which we review without deference to the trial court." Combined Investigative Servs. v. Scottsdale Ins. Co., 165 Wis. 2d 262, 273, 477 N.W.2d 82 (Ct. App. 1991). Only when a statutory time *355 limit is mandatory does the circuit court generally lose competence to proceed if that time limit is not met. Cf. Kywanda F., 200 Wis. 2d at 34; see Schoenwald v. M.C., 146 Wis. 2d 377, 391-92, 432 N.W.2d 588 (Ct. App. 1988).

DISCUSSION
[5]
¶ 7. WISCONSIN STAT. § 971.17(3)(e) states in part:
If the department of health and family services alleges that a released person has violated any condition or rule, or that the safety of the person or others requires that conditional release be revoked, he or she may be taken into custody under the rules of the department. The department of health and family services shall submit a statement showing probable cause of the detention and a petition to revoke the order for conditional release to the committing court and the regional office of the state public defender responsible for handling cases in the county where the committing court is located within 48 hours after the detention. The court shall hear the petition within 30 days, unless the hearing or time deadline is waived by the detained person. (Emphasis added.)
Schertz maintains that the word "shall" makes this provision mandatory. However, statutory time limits are often held to be directory despite the word "shall." Eby v. Kozarek, 153 Wis. 2d 75, 79-80, 450 N.W.2d 249 (1990). In deciding whether a statute's use of the word "shall" is mandatory or directory, we consider the objectives sought to be accomplished by the statute, the statute's history, the consequences that would flow from the alternative interpretations, and whether a penalty is imposed by its violation. State v. Perry, 181 Wis. 2d 43, 53-54, 510 N.W.2d 722 (Ct. App. 1993).
*356 ¶ 8. As the State correctly points out, the analysis in State v. R.R.E., 162 Wis. 2d 698, 470 N.W.2d 283 (1991), is controlling and we apply the same methodology to determine whether the thirty-day provision is directory or mandatory. In R.R.E., the defendant was found not guilty of second-degree murder and attempted murder by reason of mental disease or defect, and was committed to the State Department of Health and Social Services pursuant to WIS. STAT. § 971.17. Id. at 702. R.R.E. petitioned the court for reexamination numerous times. Each time, the petition was either withdrawn by R.R.E. or the court determined that it was unsafe to release him. Id. at 703. The case centered on one such petition, which was lost for three months. R.R.E. argued that he was entitled to release from his criminal commitment because more than thirty days passed between the filing of the petition and the hearing. Id. Determining that the legislature did not intend the release of criminally committed individuals without a court determination that it was safe to do so, the supreme court concluded that the thirty-day provision was directory rather than mandatory. Id. at 715. We follow the same analysis.
¶ 9. To begin, we attempt to discern WIS. STAT. § 971.17's objective. In R.R.E., the supreme court stated that "[t]he legislature did not intend the release of criminally committed individuals without a court determination that the individual may be safely released." Id. at 704. The court then noted that the purpose of the statute is to protect the public, while still providing a defendant a right to periodic reexamination so that he or she may be released if he or she is no longer dangerous. The thirty-day requirement protects against delay by the court or the State in this evaluation process. Id. at 709. These same objectives apply in *357 this case. The public will be protected from subsequent dangerous acts in violation of Schertz's conditions of release, and Schertz retains his right to release when he is no longer dangerous.
¶ 10. There is nothing in WIS. STAT. § 971.17's legislative history to suggest it should be mandatory, nor does the statute prescribe any penalty for its violation. In fact, the absence of a penalty provision within a statute suggests that a statutory provision is directory. Id. at 710. Further, if the legislature intends a penalty, it is up to that body to enact it. Id. at 710-11. It has not done so in this situation.
¶ 11. Finally, we look to the consequences that would flow from alternative interpretations. Schertz argues that the only consequence of the provision being mandatory would be that he would be released. He adds that even if released, the public will still be protected because he remains under supervision. However, the holding in R.R.E. again applies here. The legislature has made it clear that a criminally committed individual should not be released until the period of commitment expires, or a court has determined that the individual is no longer dangerous. Id. at 710. The supreme court was concerned about putting the burden on society for "nominal procedural delays of the court." Id. at 709. Schertz has committed acts in violation of his conditional release. To read the thirty-day provision as mandatory would allow Schertz to be released regardless of the potential danger to himself or others. This puts the public at risk of further violations.
¶ 12. Schertz argues that R.R.E. does not apply because his commitment is not criminal. He is mistaken. WISCONSIN STAT. § 971.17(3)(e) is contained in the criminal code. Like R.R.E., Schertz was found not guilty by reason of mental disease or defect of a criminal *358 offense. He was thereafter conditionally released pursuant to § 971.17. Without question, his commitment is criminal, and R.R.E. controls our analysis.
¶ 13. Schertz also argues that the legislature intended the thirty-day period to be mandatory in order to protect an individual's due process rights. He argues that if the time period was directory, an individual could be indefinitely deprived of his liberty without a hearing. He was held for more than thirty days on the first petition, and the detention was extended when the second petition was filed alleging the same violations as the first. However, we do not agree that an individual could be held indefinitely. Although the thirty-day provision is directory rather than mandatory, this does not mean that it is merely discretionary or permissive. R.R.E., 162 Wis. 2d at 715.
[6]
¶ 14. We conclude that the thirty-day requirement is directory. As a result, the failure to have a hearing within thirty days did not cause the court to lose competence to decide the second petition.
By the Court.Order affirmed.
NOTES
[1]  All references to the Wisconsin Statutes are to the 1999-2000 version unless otherwise noted.
[2]  This hearing was originally scheduled for June 22, the last day of the thirty-day period. However, Schertz was not present at that hearing because the mental institution staff would not allow him to leave because the habeas writ did not comply with the institution's requirement of a forty-eight-hour notice. The defense moved to dismiss because they could not have the hearing without him. The court granted the dismissal but stated that the State could file a new petition. Schertz's counsel stated he would object if the new petition did not allege new violations.
