Latest 1.0
Homepage https://github.com/dcordero/TimeBlock
License MIT
Platforms ios 5.0, osx 10.7, requires ARC
Authors

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'

Latest podspec

{
    "name": "TimeBlock",
    "version": "1.0",
    "summary": "Simple set of macros to measure the time spent for executing a block.",
    "homepage": "https://github.com/dcordero/TimeBlock",
    "license": "MIT",
    "authors": {
        "David Cordero": "[email protected]"
    },
    "source": {
        "git": "https://github.com/dcordero/TimeBlock.git",
        "tag": "1.0"
    },
    "source_files": "TimeBlock/*.{h,m}",
    "platforms": {
        "ios": "5.0",
        "osx": "10.7"
    },
    "requires_arc": true
}

Pin It on Pinterest

Share This