Print elapsed time when rendering from the command line

This commit is contained in:
Sergey Sharybin 2015-06-17 16:06:33 +02:00
parent bcc4957877
commit 0119c63405

@ -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)