Skip to content

dcordero/TimeBlock

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

TimeBlock

TimeBlock is composed by a couple of macros:

  • traceElapsedTimeInBlock: A simple little helper to measure the time spent for executing a block.
  • traceSlowExecutionBlock: Similar to the first one but just log if the block takes more than a indicated amount of seconds.

Usage

traceElapsedTimeInBlock (@"Log message", ^{
  // Write here the code you want to measure
});
traceSlowExecutionBlock (@"Log message", 25, ^{
  // Write here the code you want to log if it takes more than 25 seconds on runtime
});

Installation with CocoaPods

Podfile

pod 'TimeBlock', :git => 'https://github.com/dcordero/TimeBlock'

About

Simple set of macros to measure the time spent for executing a block in Objective-C

Resources

License

Stars

Watchers

Forks

Packages

No packages published