Using the past perfect tense

I came across this sentence while surfing the Web:

Yeah, I was sleeping the whole time.

I was wondering if the past continuous tense could be changed into the past perfect tense.

For context, the speaker was saying to her husband, after she had just woken up from a long sleep since lunch because of her illness.


In this case, since we're talking of a continuous action that was interrupted in the present (She just woke up), the sentence is fine as is.

Past perfect is best used when you need to place two events in the past.

In Past Perfect the sentence would be

She had slept the whole time.

This is fine if both the sleep and the waking up happened in the past