Two-time Green's function theory for laser