mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-16 10:44:45 +00:00
1 parent
d05a9eafb3
commit
dc4426d9c9
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