Start section
(String name)
| 56 | * Start section |
| 57 | */ |
| 58 | public void startSection(String name) |
| 59 | { |
| 60 | if (Lagometer.isActive()) |
| 61 | { |
| 62 | int i = name.hashCode(); |
| 63 | |
| 64 | if (i == HASH_SCHEDULED_EXECUTABLES && name.equals("scheduledExecutables")) |
| 65 | { |
| 66 | Lagometer.timerScheduledExecutables.start(); |
| 67 | } |
| 68 | else if (i == HASH_TICK && name.equals("tick") && Config.isMinecraftThread()) |
| 69 | { |
| 70 | Lagometer.timerScheduledExecutables.end(); |
| 71 | Lagometer.timerTick.start(); |
| 72 | } |
| 73 | else if (i == HASH_PRE_RENDER_ERRORS && name.equals("preRenderErrors")) |
| 74 | { |
| 75 | Lagometer.timerTick.end(); |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | if (Config.isFastRender()) |
| 80 | { |
| 81 | int j = name.hashCode(); |
| 82 | |
| 83 | if (j == HASH_RENDER && name.equals("render")) |
| 84 | { |
| 85 | GlStateManager.clearEnabled = false; |
| 86 | } |
| 87 | else if (j == HASH_DISPLAY && name.equals("display")) |
| 88 | { |
| 89 | GlStateManager.clearEnabled = true; |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | if (this.profilerLocalEnabled) |
| 94 | { |
| 95 | if (this.profilingEnabled) |
| 96 | { |
| 97 | if (!this.profilingSection.isEmpty()) |
| 98 | { |
| 99 | this.profilingSection = this.profilingSection + "."; |
| 100 | } |
| 101 | |
| 102 | this.profilingSection = this.profilingSection + name; |
| 103 | this.sectionList.add(this.profilingSection); |
| 104 | this.timestampList.add(System.nanoTime()); |
| 105 | } |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | /** |
| 110 | * End section |
no test coverage detected