The past perfect indicates that an action or a condition took place once or many times before another event that happened in the past.
Observe the two things that happened in the past.
More recent event (past)
Gina was tired
Event that happened first
she had not slept well last night.
The past perfect tense in English is formed using the subject + the auxiliary verb had + past participle.
Therefore, you can use specific time with the past perfect.
The past perfect tense could also refer to a lack of experience rather than an action that happen some time in the past.
Can you determine which event happened first, and which happened last?
Note, the placement of the adverbs in the following sentences.
Mr. Pacheco arrived in the classroom as I had just sat down.
Mr. Pacheco arrived in the classroom as I had barely sat down.
Some more examples: