I'm currently making an interface in Mathematica and I'll need to bump a window out and then let it close itself in a certain amount of time.
Here's an short example to illustrate the effect:
new = CreateDialog[Plot[x^2, {x, 0, 1}]];
Pause@3;
NotebookClose[new]
However, I may need the window to keep opening for minutes before it close itself and at the same time, there'll be a lot of processes and calculations running:
t=Now;
new = CreateDialog[Plot[x^2, {x, 0, 1}]];
Pause@3;
NotebookClose[new]
Prime /@ Range@1000000;
Now-t
(*A long time......consumed 3s unnecessary time*)
This will not be acceptable.
So, my problem is, how to solve this problem?