Socket
Book a DemoInstallSign in
Socket

github.com/fjw201198/timer

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/fjw201198/timer

Source
Go
Version
v0.0.0-20190522030821-6c020e9f7f24
Version published
Created
Source

timer

简单定时器for go

常量

// TIMER_QUEUE_SIZE 最大超时事件队列长度
TIMER_QUEUE_SIZE = 1024

方法

  • 创建定时器对象
func NewTimer() *Timer
  • 设置超时事件
func (tm *Timer) SetTimeout(seconds int, callback func()) (timerId int, err error)
  • 取消超时事件
func (tm *Timer) KillTimer(timerId int)

FAQs

Package last updated on 22 May 2019

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.