diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2017-02-25 08:18:32 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2017-02-25 09:08:42 +0300 |
commit | a0b8a9fe6816f1e704b2edbeccddf1e3285e4520 (patch) | |
tree | 0a37aa6305f2fed08bdb960e763a0c7630cc0900 /source/blender/alembic/intern/abc_util.h | |
parent | 8c5826f59a37924866ed7dd5bda7fb39c44e8227 (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.h | 19 |
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__ */ |