You can remember the meaning of 临时 with this easy mnemonic:
As the time of your trial draws nearer, you have to face (临) the fact that you are doing time (时) for your crime.
Using mnemonics to remember the meaning of Chinese characters like can have an enormous impact on how long to learn Mandarin it takes.