Remove Zotero.sleep()
This commit is contained in:
parent
ed42e0c22d
commit
27b95ebb14
1 changed files with 0 additions and 16 deletions
|
@ -1426,22 +1426,6 @@ if(appInfo.platformVersion[0] >= 2) {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sleep for a given amount of time, allowing other events on main thread to be processed
|
||||
*
|
||||
* @param {Integer} ms Milliseconds to wait
|
||||
*/
|
||||
this.sleep = function (ms) {
|
||||
var mainThread = Zotero.mainThread;
|
||||
var endTime = Date.now() + ms;
|
||||
do {
|
||||
mainThread.processNextEvent(false);
|
||||
} while (Date.now() < endTime);
|
||||
|
||||
return;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Allow other events (e.g., UI updates) on main thread to be processed if necessary
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue