とき connects events or describes timing.
Use plain form before it. Tense before とき changes meaning:
na-adjective → + na
Noun → + no
さむいとき、コートをきます。
Samui toki, kooto o kimasu.
When it's cold, I wear a coat.
がくせいのとき、にほんへいきました。
Gakusei no toki, Nihon e ikimashita.
I went to Japan when I was a student.
Use with a verb in plain present form:
[Verb] + mae ni = before doing [verb]
Do not use past tense before まえに
べんきょうするまえに、カフェにいきます。
Benkyou suru mae ni, kafe ni ikimasu.
I go to a café before studying.
ねるまえに、ほんをよみます。
Neru mae ni, hon o yomimasu.
I read a book before going to sleep.
Use ta-form before あとで:
[Verb (ta-form)] + ato de = after doing [verb]
You can also use noun + のあとで
しゅくだいをしたあとで、テレビをみました。
Shukudai o shita ato de, terebi o mimashita.
I watched TV after doing homework.
クラスのあとで、かいものします。
Kurasu no ato de, kaimono shimasu.
I go shopping after class.
Use with the verb stem:
[Verb masu stem] + ながら + main action
おんがくをききながらべんきょうします。
Ongaku o kiki nagara benkyou shimasu.
I study while listening to music.
あるきながらスマホをみないでください。
Aruki nagara sumaho o minaide kudasai.
Please don’t look at your phone while walking.
AあいだにB
→ Action B happens during Action A.
せんせいが はなしているあいだに メモをとった。
Sensei ga hanashite iru aida ni memo o totta.
I took notes while the teacher was talking.
ねているあいだに じしんがありました。
Nete iru aida ni jishin ga arimashita.
There was an earthquake while I was sleeping.
ともだちが いぬのさんぽをしているあいだに ぼくはちゅうしゃじょうをさがした。
Tomodachi ga inu no sanpo o shite iru aida ni boku wa chuushajou o sagashita.
While my friend was walking the dog, I looked for a parking lot.
ごろ is used to indicate approximate time, such as “around 5 o’clock” or “about noon.” It attaches directly to time expressions (especially clock time).
ごご5じごろに いえに かえります。
Gogo go-ji goro ni ie ni kaerimasu.
I’ll go home at around 5 PM.
かようびごろテストが あります。
Kayoubi goro tesuto ga arimasu.
There’s a test around Tuesday.
ひるごろに ひるごはんを たべました。
Hiru goro ni hirugohan o tabemashita.
I ate lunch at about noon.
ぐらい (or its variant くらい) is used to express an approximate quantity, degree, or duration — like “about,” “approximately,” or “around.”
Used with:
一時間ぐらい まちました。
Ichijikan gurai machimashita.
I waited for about an hour.
1000円ぐらい かかります。
Sen-en gurai kakarimasu.
It costs about 1000 yen.
10人ぐらいが来ました。
Juunin gurai ga kimashita.
About ten people came.