forked from rstudio/rstudio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request rstudio#3937 from rstudio/bugfix/theme-handler-reg…
…istrations clean up handler registrations on dismiss
- Loading branch information
Showing
3 changed files
with
52 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Timers.java | ||
* | ||
* Copyright (C) 2009-18 by RStudio, Inc. | ||
* | ||
* Unless you have received this program directly from RStudio pursuant | ||
* to the terms of a commercial license agreement with RStudio, then | ||
* this program is licensed to you under the terms of version 3 of the | ||
* GNU Affero General Public License. This program is distributed WITHOUT | ||
* ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT, | ||
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the | ||
* AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details. | ||
* | ||
*/ | ||
package org.rstudio.studio.client.common; | ||
|
||
import com.google.gwt.user.client.Command; | ||
import com.google.gwt.user.client.Timer; | ||
|
||
public class Timers | ||
{ | ||
public static final void singleShot(int delayMs, final Command command) | ||
{ | ||
new Timer() | ||
{ | ||
@Override | ||
public void run() | ||
{ | ||
command.execute(); | ||
} | ||
}.schedule(delayMs); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters