[間「あいだ」]/[間「あいだ」]に => During A, During A (before A is finished/over) N2
Time, Situation
[時「とき」] => At the time A N5
Time
Vた[時「とき」] => After having done something N5
Time