From a220c5c16fd45c7ac18d2647c08166c89d4767ac Mon Sep 17 00:00:00 2001 From: "Jeison Yehuda Amihud (Blender Dumbass)" Date: Fri, 12 May 2023 06:26:13 +0000 Subject: [PATCH] Reduced a few multiplies and divides by a large number. I'm counting times in microseconds. But I should not need to always multiply and divide on them when doing time showings. This is just waste of cycles. --- studio/studio_renderLayer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/studio/studio_renderLayer.py b/studio/studio_renderLayer.py index 9f1eec1..1622c42 100644 --- a/studio/studio_renderLayer.py +++ b/studio/studio_renderLayer.py @@ -1007,14 +1007,15 @@ def layer(win, call): # REMAINING TIME remaining = avarage * (win.renders[render]["end_frame"] - win.renders[render]["current_frame"] + 1) - remaining = remaining - ((time.time() - win.render_runtime.get("started_rendering", 0))*1000000) + remaining = remaining/1000000 + remaining = remaining - (time.time() - win.render_runtime.get("started_rendering", 0)) UI_color.set(layer, win, "text_normal") layer.set_font_size(20) layer.move_to(x+10, y+current_Y + win.scroll["render"]+30) - layer.show_text(talk.text("render_remaining_time")+" "+UI_math.timestring(remaining/1000000)) + layer.show_text(talk.text("render_remaining_time")+" "+UI_math.timestring(remaining)) current_Y = current_Y + 40