A public officer upon whom a duty is imposed by this title, who knowingly fails or refuses to perform that duty in the manner prescribed by law, is guilty of a class 3 misdemeanor.