The main problem I see here is not the timing issue but the fact you swore at him. Going by what you have said about your boss he will use this against you and milk it for all its worth.
Just be cool and calm in the disiplinary, its not worth losing your job over.
Just be cool and calm in the disiplinary, its not worth losing your job over.