Socket
Book a DemoInstallSign in
Socket

github.com/HouGuoFa/enhanceTimer

Package Overview
Dependencies
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/HouGuoFa/enhanceTimer

Source
Go
Version
v0.0.0-20160527063116-34fd891208d0
Version published
Created
Source

About timer

  • timer is a standard golang packet, with high performance tick-timer, while the accuracy is not high(Resolution 1s). By using enhanceTimer, the performance can be improved much.

How to use

  • Importing the same standard package (time packet and NewTimer function)
  • Add these source files to your program folder, named by enhanceTimer or something

Example

import (
    "enhanceTimer"  //the standard golang package;
)

func main() {

    tick := enhanceTimer.NewTimer(1)
    defer tick.Stop()

    select {
        case <-tick.C:
        // todo something
    }
}

FAQs

Package last updated on 27 May 2016

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