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:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2017-02-25 08:18:32 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2017-02-25 09:08:42 +0300
commita0b8a9fe6816f1e704b2edbeccddf1e3285e4520 (patch)
tree0a37aa6305f2fed08bdb960e763a0c7630cc0900 /source/blender/alembic/intern/abc_util.h
parent8c5826f59a37924866ed7dd5bda7fb39c44e8227 (diff)
Alembic: addition of a scope timer to perform basic profiling.
Diffstat (limited to 'source/blender/alembic/intern/abc_util.h')
-rw-r--r--source/blender/alembic/intern/abc_util.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/alembic/intern/abc_util.h b/source/blender/alembic/intern/abc_util.h
index a7ac9df91c7..85ba4d5c9c7 100644
--- a/source/blender/alembic/intern/abc_util.h
+++ b/source/blender/alembic/intern/abc_util.h
@@ -146,4 +146,23 @@ ABC_INLINE void copy_yup_from_zup(short yup[3], const short zup[3])
yup[2] = -zup[1];
}
+/* *************************** */
+
+#undef ABC_DEBUG_TIME
+
+class ScopeTimer {
+ const char *m_message;
+ double m_start;
+
+public:
+ ScopeTimer(const char *message);
+ ~ScopeTimer();
+};
+
+#ifdef ABC_DEBUG_TIME
+# define SCOPE_TIMER(message) ScopeTimer prof(message)
+#else
+# define SCOPE_TIMER(message)
+#endif
+
#endif /* __ABC_UTIL_H__ */