In the first sentence, the phrases "so as" or "in order" are OK, but not necessary.
The terrorist primed the bomb but at the last minute tried delaying the timer (so as/in order) to gain some time.
I would phrase the second sentence:
- I had to control myself not to do it.
The other versions are OK, but a bit wordy for my taste...
All the best!