Time spent by a defendant in a restoration to competency program or an approved facility pursuant to this chapter, shall be credited to the term of imprisonment, if any, for which the defendant is sentenced in the criminal case which was suspended under § 23A-10A-5.
SDCL 23A-10A-16