Either of these will do: I am sorry, but I haven't been paying attention because all that noise in the next office is driving me crazy. I am sorry, but I wasn't paying attention because all that noise in the next office is driving me crazy. Apart from expressing duration, the -ing form tells the listener that you intend to listen from now on.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.