(a) General rule.--Except as provided in subsection (b), any person subject to this part who is found drunk on duty, sleeping on his post or who leaves his post before being relieved shall be punished as a court-martial may direct.
(b) Sentinel or look-out.--Any sentinel or look-out who is found drunk on duty, sleeping on his post or who leaves his post before being relieved shall be punished, if the offense is committed in time of war, by confinement of not more than five years or by other punishment as a court-martial may direct. If the offense is committed at any other time, the person shall be punished as a court-martial may direct.