Service by any person in the armed forces of the United States, or in national emergency, time of war, insurrection, or rebellion, shall be considered as continuous service in the National Guard for any and all purposes regarding privileges and exemptions provided by law for members of the National Guard by enlistment or commission; Provided, that the continuous service for an officer shall include only the time he was commissioned as such.