A time-dependent model for reactive sputter deposition