「…するとすぐ」
I had hardly left [gone out of] the office when [before] it began to rain. = Hardly had I left [gone out of ] the office when [before] it began to rain.
会社を出たとたん雨が降り出した。
※ 後者の文は倒置
She had scarecely come home when the phone rang.
彼女が帰宅するとすぐ電話が鳴った。
※ rang = ring「鳴る」の過去・過去分詞
Hardly had the cat seen me before it ran away.
そのネコは私を見るやいなや逃げていった。
「…するかしないかのうちに」
He had hardly picked up the receiver [phone] when someone knocked at the door.
彼が受話器を取るか取らないかのうちに誰かがドアをノックした。
※ receiver (名)受話器