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.
This commit is contained in:
Jeison Yehuda Amihud (Blender Dumbass) 2023-05-12 06:26:13 +00:00
parent 04080bff00
commit a220c5c16f

View file

@ -1007,14 +1007,15 @@ def layer(win, call):
# REMAINING TIME # REMAINING TIME
remaining = avarage * (win.renders[render]["end_frame"] - win.renders[render]["current_frame"] + 1) 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") UI_color.set(layer, win, "text_normal")
layer.set_font_size(20) layer.set_font_size(20)
layer.move_to(x+10, layer.move_to(x+10,
y+current_Y + win.scroll["render"]+30) 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 current_Y = current_Y + 40