Spectrum sensing is a critical issue in a cognitive radio (CR). In this paper, we propose a novel spectrum-sensing algorithm that exploits the time diversity of sensing results generated by a CR spectrum sensor. In the proposed algorithm, the CR sensor combines multiple sensing results obtained at different time points to make an optimal decision on the existence of spectrum access opportunity. It considers the traffic pattern of the primary user and maximizes the spectrum utilization of the CR, given the allowable interference level to the primary user. From our mathematical analysis, the principles of combining multiple sensing results in the time domain are revealed, and the detection and the false alarm probabilities are derived.