Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 339 Bytes

README.md

File metadata and controls

29 lines (20 loc) · 339 Bytes

gdelay

Delayed execution function

Install

go get github.com/nobody05/gdelay

Used

delay := NewDelay(3)
delay.Start()


delay.DelayAdd(&DelayParam{
    Duration: time.Now().Add(time.Second * 3)).Unix(),
    Fun: func() {
        log.Println("hello world")
    },
})

// wait for delay execute 
for {

}