šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

github.com/dufguix/go_timer

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/dufguix/go_timer

v0.0.0-20250408082136-81d5ab885043
Source
Go
Version published
Created
Source

Simple timer for GO and TinyGO

Example

//Create timer and reset it
var myTimer = Timer{}
myTimer.Reset()

//Check if timer is elapsed
//method 1
if myTimer.RefreshAndCheck(time.Second * 2) {
    //do something
    myTimer.Reset()
}

//method 2
myTimer.Refresh()
if myTimer.Check(time.Second * 2) {
    //do something
    myTimer.Reset()
}

Install

go get github.com/dufguix/go_timer

import (
	"time"
	timer "github.com/dufguix/go_timer"
)

FAQs

Package last updated on 08 Apr 2025

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