mirror of
https://gitee.com/openharmony/useriam_user_auth_framework
synced 2024-11-27 01:40:49 +00:00
add XCollie
Signed-off-by: lvshuai <lvshuai11@h-partners.com> Change-Id: I7a0172079d25c415cf3866008ec096beaceda74f
This commit is contained in:
parent
57777ed78a
commit
8cafd77723
@ -31,14 +31,12 @@ XCollieHelper::XCollieHelper(const std::string &name, unsigned int timeout)
|
||||
{
|
||||
id_ = HiviewDFX::XCollie::GetInstance()
|
||||
.SetTimer(name_, timeout_, nullptr, nullptr, HiviewDFX::XCOLLIE_FLAG_DEFAULT);
|
||||
IAM_LOGI("start XCollie, name:%{public}s, timeout:%{public}u", name_.c_str(), timeout_);
|
||||
}
|
||||
|
||||
XCollieHelper::~XCollieHelper()
|
||||
{
|
||||
IAM_LOGI("cancel XCollie, name:%{public}s", name_.c_str());
|
||||
HiviewDFX::XCollie::GetInstance().CancelTimer(id_);
|
||||
}
|
||||
} // namespace Common
|
||||
} // namespace UserIam
|
||||
} // namespace UserIam
|
||||
} // namespace OHOS
|
@ -22,10 +22,12 @@ namespace OHOS {
|
||||
namespace UserIam {
|
||||
namespace Common {
|
||||
constexpr unsigned int API_CALL_TIMEOUT = 5; // 5s
|
||||
|
||||
class XCollieHelper {
|
||||
public:
|
||||
XCollieHelper(const std::string &name, unsigned int timeout);
|
||||
~XCollieHelper();
|
||||
|
||||
private:
|
||||
int id_;
|
||||
const std::string name_;
|
||||
|
Loading…
Reference in New Issue
Block a user