[Bf-blender-cvs] [0119c63] master: Print elapsed time when rendering from the command line

Sergey Sharybin noreply at git.blender.org
Wed Jun 17 16:06:54 CEST 2015


Commit: 0119c63405a1fcc66600cc650cec331f27ece712
Author: Sergey Sharybin
Date:   Wed Jun 17 16:06:33 2015 +0200
Branches: master
https://developer.blender.org/rB0119c63405a1fcc66600cc650cec331f27ece712

Print elapsed time when rendering from the command line

===================================================================

M	source/blender/render/intern/source/pipeline.c

===================================================================

diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index e2f82cb..20883aa 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -165,6 +165,7 @@ static void stats_background(void *UNUSED(arg), RenderStats *rs)
 {
 	uintptr_t mem_in_use, mmap_in_use, peak_memory;
 	float megs_used_memory, mmap_used_memory, megs_peak_memory;
+	char info_time_str[32];
 
 	mem_in_use = MEM_get_memory_in_use();
 	mmap_in_use = MEM_get_mapped_memory_in_use();
@@ -182,8 +183,11 @@ static void stats_background(void *UNUSED(arg), RenderStats *rs)
 	if (rs->curblur)
 		fprintf(stdout, IFACE_("Blur %d "), rs->curblur);
 
+	BLI_timestr(PIL_check_seconds_timer() - rs->starttime, info_time_str, sizeof(info_time_str));
+	fprintf(stdout, IFACE_("| Time:%s | "), info_time_str);
+
 	if (rs->infostr) {
-		fprintf(stdout, "| %s", rs->infostr);
+		fprintf(stdout, "%s", rs->infostr);
 	}
 	else {
 		if (rs->tothalo)




More information about the Bf-blender-cvs mailing list