Alright, I hate to be too anal, but you should avoid the "removeALLeventhandler" command whenever possible. What if an EH was added by another script? Then you just erased it.
Unfortunately, EH indexes don't work the same way that actions do, so they can be a real pain in the arse to remove. The problem is, if you add 3 EH's, their indexes might look like this:
EH1 -> 0
EH2 -> 1
EH3 -> 2
If you remove the second EH, then their indexes would look like this:
EH1 -> 0
EH3 -> 1
So the index of EH3 just dropped, meaning you can't reliably store its idx in a global variable. Sux, don't it? However, if you are only adding the EH for a short period of time, you might be able to assume that no other EHs will be removed in that time.
The other problem is that the EH doesn't pass it's idx to it's code like with actions. This can be solved with the same little trick you used to pass "time" to the EH:
;find out the next EH's index with a dummy EH
_idx = _unit addeventhandler ["fired", {}]
;remove the dummy EH
_unit removeeventhandler ["fired", _idx]
;add the real EH. It will have the index we found above
;pass the index we found into the EH we add via the "format" command
_unit addeventhandler ["fired", format[{[_this select 0, %1] exec "blah.sqs"}, _idx] ]
Then in you have the EH's index passed to its code. Within that code, you can then use that index to remove that EH only, without removing any others that might exist:
blah.sqs
? time > 30 : (_this select 0) removeeventhandler ["fired", _this select 1]
...