Spectral form factor in a random matrix theory