Spectrum sensing is a critical issue in cognitive radio (CR) systems. When the energy of the CR system is constrained, using the energy efficiently is an important problem, which must be considered. In this paper, the energy efficiency is defined as the ratio of average spectrum efficiency of the CR system over average power consumed by the CR system. We consider a joint optimization of sensing time and power allocation to maximize the energy efficiency under the condition of sufficient protection to primary user and the delay constraint. It is demonstrated that convex optimization plays an essential role in solving the problem. An efficient iterative algorithm is proposed to obtain the optimal values. Then, we propose a block sensing scheme in which several adjacent frames are bundled as a block. Our results show that significant improvement in the energy efficiency is obtained via joint optimization of sensing time and power allocation. The energy efficiency and the delay performance can be further improved by using the proposed block sensing scheme.