public class Throttler extends Object
Constructor and Description |
---|
Throttler(Display display,
Duration minWaitTime,
Runnable runnable)
Initializes a new throttler object that will throttle the execution of
the given runnable in the
UI thread of the
given display. |
Modifier and Type | Method and Description |
---|---|
void |
throttledExec()
Schedules the wrapped runnable to be run after the configured wait time
or do nothing if it has already been scheduled but not executed yet.
|
public Throttler(Display display, Duration minWaitTime, Runnable runnable)
UI thread
of the
given display. The throttler will ensure that the runnable will not run
more than every minWaitTime
, even if it is
executed
more often.display
- the display owning the thread onto which the runnable will be
executed.minWaitTime
- the minimum duration between each execution of the given
runnable.runnable
- the runnable to throttle.
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.