Skip to content

maxgordeev/MRWatchdog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MRWatchdog

Usage

Setup with delay and handler:

NSTimeInterval const delayInMSec = 300; // ms
[MRWatchdog setupWithDelay:delayInMSec handler:^{
   throw std::runtime_error("Possible UI freeze!");
}];

Start to catch use-cases that are freezes UI for more than 300 ms:

[MRWatchdog start];

After catching an exception you can simply analyze Main thread call stack and find the problem in your code.

Stop the watchdog:

[MRWatchdog stop];

If you have an unfixable UI freeze (ex. using of thirdparty UI libraries) you can simply tell watchdog to skip observing freezes for (2 * delay) ms:

[MRWatchdog skip];

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published