It is supposed that in the time interval $(0, \infty)$ a stochastic process is alternately in states $A$ and $B$. Denote by $\alpha_1, \beta_1, \alpha_2, \beta_2, \cdots$ the lengths of the successive intervals spent in states $A$ and $B$ respectively. In this paper the distribution and the asymptotic distribution of the total time spent in state $A(B)$ in the interval $(0, t)$ are determined in the case where $(\alpha_1, \beta_1), (\alpha_2, \beta_2), \cdots$ are mutually independent and identically distributed vector variables.