🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

github.com/dwburke/go-func-timer

Package Overview
Dependencies
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/dwburke/go-func-timer

Source
Go
Version
v0.0.0-20210206031918-72bc510ff136
Version published
Created
Source

go-func-timer

golang function timer - taken from https://coderwall.com/p/cp5fya/measuring-execution-time-in-go

The author of that helpful article did not include a repo to pull it in as a package, which I felt would be useful, so I created this, buf full credit goes to the original author.

Example

Copied example:

func factorial(n *big.Int) (result *big.Int) {
    defer exectimer.Track(time.Now(), "factorial")
    // ... do some things, maybe even return under some condition
    return n
}

FAQs

Package last updated on 06 Feb 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