提交 07f89352 authored 作者: Thomas Mueller's avatar Thomas Mueller

Simplify usage.

上级 b0ed2038
......@@ -232,17 +232,22 @@ public class Profiler implements Runnable {
/**
* Start collecting profiling data.
*
* @return this
*/
public void startCollecting() {
public Profiler startCollecting() {
thread = new Thread(this, "Profiler");
thread.setDaemon(true);
thread.start();
return this;
}
/**
* Stop collecting.
*
* @return this
*/
public void stopCollecting() {
public Profiler stopCollecting() {
stop = true;
if (thread != null) {
try {
......@@ -252,6 +257,7 @@ public class Profiler implements Runnable {
}
thread = null;
}
return this;
}
public void run() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论