There's always many ways to accomplish anything in programming, but here's how I'd do it.
Create a group called "KillMBox" and set it to be disabled upon startup.
In that group, use Trigger Once to set a private variable to 3.
Then, every second, subtract one from the private variable, and check to see if it's zero.
If it is, then hide/destroy the message box and disable the group.
Here it is:
The good thing about this approach is that when you decide to display the message box, you simply enable the group KillMBox and it will look after everything else, including shutting itself down when it's finished.
If you want to use it for multiple message boxes then you'll need to adjust the code to check each instance of the message boxes, destroying each one as it's needed to be, and only disabling the group when there are no instances of message box left.
And of course, you can always change the values of the checking and the private variable to get exactly the timing you want.
For instance, checking every 100 msecs and setting the private variable to 23 will display the message boxes for 2.3 seconds.
Hope that helps,