Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-03-19 17:19:22 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-19 19:38:43 +0300
commit5b7b7101c81ca104111e0df76cccf5b1c88bd3f6 (patch)
treed26d5295a226e14c904e3bb904cb51a1292a3b3a /intern/cycles/blender/blender_session.cpp
parent01df4818a6e1d3b93517e48a617310481abd9339 (diff)
Cycles: Implement function to format and parse human readable time
Gives value in seconds for a string which is encoded in format HH:MM:SS.hh.
Diffstat (limited to 'intern/cycles/blender/blender_session.cpp')
-rw-r--r--intern/cycles/blender/blender_session.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/intern/cycles/blender/blender_session.cpp b/intern/cycles/blender/blender_session.cpp
index 923fdf9be4b..87dc39ca676 100644
--- a/intern/cycles/blender/blender_session.cpp
+++ b/intern/cycles/blender/blender_session.cpp
@@ -960,7 +960,6 @@ void BlenderSession::update_status_progress()
string scene = "";
float progress;
double total_time, remaining_time = 0, render_time;
- char time_str[128];
float mem_used = (float)session->stats.mem_used / 1024.0f / 1024.0f;
float mem_peak = (float)session->stats.mem_peak / 1024.0f / 1024.0f;
@@ -980,13 +979,11 @@ void BlenderSession::update_status_progress()
scene += ", " + b_rview_name;
}
else {
- BLI_timecode_string_from_time_simple(time_str, sizeof(time_str), total_time);
- timestatus = "Time:" + string(time_str) + " | ";
+ timestatus = "Time:" + time_human_readable_from_seconds(total_time) + " | ";
}
if(remaining_time > 0) {
- BLI_timecode_string_from_time_simple(time_str, sizeof(time_str), remaining_time);
- timestatus += "Remaining:" + string(time_str) + " | ";
+ timestatus += "Remaining:" + time_human_readable_from_seconds(remaining_time) + " | ";
}
timestatus += string_printf("Mem:%.2fM, Peak:%.2fM", (double)mem_used, (double)mem_peak);