mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-15 21:50:37 +08:00
[mpp_time]: Add AUTO_TIMING for C++ function
Signed-off-by: Herman Chen <herman.chen@rock-chips.com> Change-Id: I1ec9f6307dce44f7aa086911477b27e523904cdc
This commit is contained in:
@@ -427,3 +427,15 @@ void mpp_timer_put(MppTimer timer)
|
||||
impl = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
AutoTiming::AutoTiming(const char *name)
|
||||
{
|
||||
mStart = mpp_time();
|
||||
mName = name;
|
||||
}
|
||||
|
||||
AutoTiming::~AutoTiming()
|
||||
{
|
||||
mEnd = mpp_time();
|
||||
mpp_log("%s timing %lld us\n", mName, mEnd - mStart);
|
||||
}
|
||||
|
Reference in New Issue
Block a user