Project

clocked

0.0
No release in over a year
A simple code timer
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

Clocked Build Status Gem Version

A simple code timer. One of many. But simple.

Installation

Add this line to your application's Gemfile:

# update with the version of your choice
gem 'clocked'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install clocked

Usage

require "clocked"

sw = Clocked::Stopwatch.new("My expensive routine")

sleep 3.2
sw.mark_lap

sleep 1.4
sw.mark_lap("next one")

sleep 0.5
sleep 0.8
sw.mark_lap

puts sw

Output:

My expensive routine: 5.912148s (Lap 1: 3.201557s, next one: 1.404762s, Lap 3: 1.305776s)

Problems?

Please submit an issue. We'll figure out how to get you up and running with Clocked as smoothly as possible.