mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-19 03:49:12 +00:00
fix #479
This commit is contained in:
4 files changed
+24
-6
No files matched your search
@@ -14,14 +14,21 @@ public class AsyncTaskProfiler extends TaskProfiler {
|
||||
|
||||
public Map<String, Long> times = new ConcurrentHashMap<>();
|
||||
|
||||
@Override
|
||||
public void start(String section) {
|
||||
if (section == null) section = "<unnamed>";
|
||||
threadedProfiler.get().start(section);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void end() {
|
||||
threadedProfiler.get().end();
|
||||
times.putAll(threadedProfiler.get().times);
|
||||
TaskProfiler profiler = threadedProfiler.get();
|
||||
if (profiler != null) {
|
||||
profiler.end();
|
||||
if (profiler.times != null && !profiler.times.isEmpty()) {
|
||||
times.putAll(threadedProfiler.get().times);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user