Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

clocked

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clocked

  • 0.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

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.

FAQs

Package last updated on 08 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc