本文整理了Java中org.robolectric.util.Scheduler.nextTaskIsScheduledBefore()
方法的一些代码示例,展示了Scheduler.nextTaskIsScheduledBefore()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Scheduler.nextTaskIsScheduledBefore()
方法的具体详情如下:
包路径:org.robolectric.util.Scheduler
类名称:Scheduler
方法名:nextTaskIsScheduledBefore
暂无
代码示例来源:origin: robolectric/robolectric
/**
* Determine if any enqueued runnables are enqueued before the current time.
*
* @return True if any runnables can be executed.
*/
public synchronized boolean areAnyRunnable() {
return nextTaskIsScheduledBefore(currentTime);
}
代码示例来源:origin: robolectric/robolectric
/**
* Run all runnables that are scheduled before the endTime.
*
* @param endTime Future time.
* @return True if a runnable was executed.
*/
public synchronized boolean advanceTo(long endTime) {
if (endTime < currentTime || runnables.isEmpty()) {
currentTime = endTime;
return false;
}
int runCount = 0;
while (nextTaskIsScheduledBefore(endTime)) {
runOneTask();
++runCount;
}
currentTime = endTime;
return runCount > 0;
}
代码示例来源:origin: org.robolectric/robolectric-utils
/**
* Determine if any enqueued runnables are enqueued before the current time.
*
* @return True if any runnables can be executed.
*/
public synchronized boolean areAnyRunnable() {
return nextTaskIsScheduledBefore(currentTime);
}
代码示例来源:origin: org.robolectric/utils
/**
* Determine if any enqueued runnables are enqueued before the current time.
*
* @return True if any runnables can be executed.
*/
public synchronized boolean areAnyRunnable() {
return nextTaskIsScheduledBefore(currentTime);
}
代码示例来源:origin: org.robolectric/utils
/**
* Run all runnables that are scheduled before the endTime.
*
* @param endTime Future time.
* @return True if a runnable was executed.
*/
public synchronized boolean advanceTo(long endTime) {
if (endTime < currentTime || runnables.isEmpty()) {
currentTime = endTime;
return false;
}
int runCount = 0;
while (nextTaskIsScheduledBefore(endTime)) {
runOneTask();
++runCount;
}
currentTime = endTime;
return runCount > 0;
}
代码示例来源:origin: org.robolectric/robolectric-utils
/**
* Run all runnables that are scheduled before the endTime.
*
* @param endTime Future time.
* @return True if a runnable was executed.
*/
public synchronized boolean advanceTo(long endTime) {
if (endTime - currentTime < 0 || size() < 1) {
currentTime = endTime;
return false;
}
int runCount = 0;
while (nextTaskIsScheduledBefore(endTime)) {
runOneTask();
++runCount;
}
currentTime = endTime;
return runCount > 0;
}
内容来源于网络,如有侵权,请联系作者删除!