Extract if(dpms) calls to wrapper functions
Extract start/stop timer code to reusable funcs
Replace '1' with "EXIT_FAILURE"