Skip to main content
edited tags
Link
Karsten7
  • 27.6k
  • 5
  • 74
  • 135
edited tags
Link
Kuba
  • 137.7k
  • 13
  • 289
  • 751
added 3 characters in body; edited tags
Source Link
Kuba
  • 137.7k
  • 13
  • 289
  • 751

I'm currently making aan interface in MathematicaMathematica 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?

I'm currently making a 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?

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?

Tweeted twitter.com/StackMma/status/757464105095729152
Source Link
Wjx
  • 9.7k
  • 1
  • 34
  • 70
Loading