本文整理了Java中org.apache.commons.lang.time.StopWatch.resume()
方法的一些代码示例,展示了StopWatch.resume()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。StopWatch.resume()
方法的具体详情如下:
包路径:org.apache.commons.lang.time.StopWatch
类名称:StopWatch
方法名:resume
[英]Resume the stopwatch after a suspend.
This method resumes the watch after it was suspended. The watch will not include time between the suspend and resume calls in the total time.
[中]暂停后恢复秒表。
此方法会在暂停后恢复手表。手表将不包括暂停和恢复通话之间的总时间。
代码示例来源:origin: com.twitter.common/util
public void resume() {
if (!_started) {
start();
} else {
super.resume();
}
}
代码示例来源:origin: org.zaproxy/zap
public void start(StructuralNode node) {
if (stopWatchStarted) {
stopWatch.resume();
} else {
stopWatch.start();
stopWatchStarted = true;
}
try {
inOrderAnalyse(node);
} finally {
stopWatch.suspend();
}
}
代码示例来源:origin: stackoverflow.com
StopWatch stopWatch = new StopWatch();
stopWatch.start();
...
stopWatch.suspend();
...
stopWatch.resume();
...
stopWatch.stop():
long elapsed = stopWatch.getTime();
代码示例来源:origin: NationalSecurityAgency/datawave
stats.getTimer(TIMERS.SCANNER_START).resume();
try {
if (null != stats) {
stats.getTimer(TIMERS.SCANNER_ITERATE).resume();
代码示例来源:origin: de.tudarmstadt.ukp.dkpro.teaching/de.tudarmstadt.ukp.dkpro.teaching.frequency
public static void main(String[] args) throws Exception
{
Web1TProvider web1t = new Web1TProvider(new Locale("de"), 1);
BrownCorpus brown = new BrownCorpus();
StopWatch watch = new StopWatch();
watch.start();
watch.suspend();
for (Text text : brown.getTexts()) {
for (Sentence s : text.getSentences()) {
for (String t : s.getTokens()) {
watch.resume();
web1t.getFrequency(t);
watch.suspend();
}
}
}
double time = (double) watch.getTime() / 1000;
System.out.println(time + "s");
}
}
代码示例来源:origin: NationalSecurityAgency/datawave
stats.getTimer(TIMERS.SCANNER_START).resume();
try {
if (null != stats)
stats.getTimer(TIMERS.SCANNER_ITERATE).resume();
retrievalCount = scannerInvariant(iter);
} finally {
代码示例来源:origin: NationalSecurityAgency/datawave
myStats.getTimer(TIMERS.SCANNER_START).resume();
delegatedResource = delegatorReference.getScannerResource();
if (log.isTraceEnabled())
myStats.getTimer(TIMERS.SCANNER_ITERATE).resume();
while (iter.hasNext()) {
if (!continueMultiScan)
代码示例来源:origin: NationalSecurityAgency/datawave
stats.getTimer(TIMERS.HASNEXT).resume();
代码示例来源:origin: NationalSecurityAgency/datawave
stats.getTimer(TIMERS.HASNEXT).resume();
内容来源于网络,如有侵权,请联系作者删除!