diff options
Diffstat (limited to 'intern/cycles/util/util_time.h')
-rw-r--r-- | intern/cycles/util/util_time.h | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/intern/cycles/util/util_time.h b/intern/cycles/util/util_time.h index ed4dd5154d7..bc9a7414312 100644 --- a/intern/cycles/util/util_time.h +++ b/intern/cycles/util/util_time.h @@ -32,38 +32,38 @@ void time_sleep(double t); /* Scoped timer. */ class scoped_timer { -public: - explicit scoped_timer(double *value = NULL) : value_(value) - { - time_start_ = time_dt(); - } - - ~scoped_timer() - { - if(value_ != NULL) { - *value_ = get_time(); - } - } - - double get_start() const - { - return time_start_; - } - - double get_time() const - { - return time_dt() - time_start_; - } - -protected: - double *value_; - double time_start_; + public: + explicit scoped_timer(double *value = NULL) : value_(value) + { + time_start_ = time_dt(); + } + + ~scoped_timer() + { + if (value_ != NULL) { + *value_ = get_time(); + } + } + + double get_start() const + { + return time_start_; + } + + double get_time() const + { + return time_dt() - time_start_; + } + + protected: + double *value_; + double time_start_; }; /* Make human readable string from time, compatible with Blender metadata. */ string time_human_readable_from_seconds(const double seconds); -double time_human_readable_to_seconds(const string& str); +double time_human_readable_to_seconds(const string &str); CCL_NAMESPACE_END |