gtask

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2023 License: MulanPSL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GEntry

type GEntry struct {
	Entry      *gtimer.Entry
	BeforeCall []*func(params ...interface{})
}

type GTask

type GTask struct {
	TM GTimer
}

func Get

func Get() *GTask

func New

func New() *GTask

func (*GTask) OnDestroy

func (g *GTask) OnDestroy()

type GTimer

type GTimer struct {
	// contains filtered or unexported fields
}

func (*GTimer) BeforeCall

func (g *GTimer) BeforeCall(name string, params ...interface{})

func (*GTimer) DelayCancel

func (g *GTimer) DelayCancel(name string)

DelayCancel cancel timer

func (*GTimer) DelayRunOnce

func (g *GTimer) DelayRunOnce(name string, tm time.Duration, call func(), beforeCall ...*func(params ...interface{})) error

** DelayRunOnce delay execution function call timeout call method beforeCall user calls the method through name

func (*GTimer) GetStatus

func (g *GTimer) GetStatus(name string) int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL