Commit: 90299e4216fc50bfbe245c9658f3d938635982a4
Author: Sergey Sharybin
Date:   Fri Aug 25 14:15:51 2017 +0200
Branches: master
https://developer.blender.org/rB90299e4216fc50bfbe245c9658f3d938635982a4

Cycles: Add utility function to query current value of scoped timer

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

M       intern/cycles/util/util_time.h

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

diff --git a/intern/cycles/util/util_time.h b/intern/cycles/util/util_time.h
index 65798244111..f03aa590e9b 100644
--- a/intern/cycles/util/util_time.h
+++ b/intern/cycles/util/util_time.h
@@ -37,7 +37,7 @@ public:
        ~scoped_timer()
        {
                if(value_ != NULL) {
-                       *value_ = time_dt() - time_start_;
+                       *value_ = get_time();
                }
        }
 
@@ -46,6 +46,11 @@ public:
                return time_start_;
        }
 
+       double get_time() const
+       {
+               return time_dt() - time_start_;
+       }
+
 protected:
        double *value_;
        double time_start_;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to