Modeling cardiac pacemakers with relaxation oscillators