I created a PopupPanel
and have shown it. I want to hide it after one minute has passed. During that one minute, the process should not be stopped or paused. How can I achieve this behavior?
On any given processor, the total waiting time for an ordered set of processes taking time P1.. PN to complete is the total of individual elapsed times multiplied by the number of waiting processes remaining: (N - 1)P1 + (N - 2)P2 + ... + PN-1.
Calculate the execution time The difference between the end time and start time is the execution time. Get the execution time by subtracting the start time from the end time.
Overview: What is process time? The time it takes from when an item enters a process until it exits a process is called process lead time (PLT), or Little's Law. That total time consists of the processing time at each workstation plus any waiting or queue time while in the process.
The process time is the time a workpiece takes to enter and exit a workstation. Cycle time normally refers to the time it takes to work on a unit from start to finish.
Try to use: java.util.Timer
And you can do something like this:
int seconds = 60;
Timer timer = new Timer();
timer.schedule(new YourScheduledTask(), seconds * 1000);
Exmaple: Use java.util.Timer to schedule a task to execute once 5 seconds have passed
GWT has its own implementation of Timer
.
Here a really small example:
public void onModuleLoad() {
final PopupPanel popUp = new PopupPanel();
Label text = new Label("gone in a sec");
popUp.setWidget(text);
Timer timer = new Timer() {
@Override
public void run() {
popUp.hide();
}
};
popUp.center();
timer.schedule(3000);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With