timelist

package
v0.0.0-...-4675295 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ITimeHandler

type ITimeHandler interface {
	// 更新时间集合
	UpdateTimerSet(ctx interface{}, createParams, updateParams []interface{})
}

type ITimeHost

type ITimeHost interface {
}

type TimeItem

type TimeItem struct {
	// 识别号
	Id int
	// 结束时间
	Complete int
	// 处理函数的对象
	//Target *factory.Link
	Target interface{}
	// 处理函数的参数
	CreateParams []interface{}
	UpdateParams []interface{}
	// 是否已经清除掉的标记
	Removed bool
	//
	Scale float64
	//
	DebugTag string
}

func CreateTimerItem

func CreateTimerItem() *TimeItem

func NewTimeItem

func NewTimeItem() (obj *TimeItem)

func (*TimeItem) Dispose

func (item *TimeItem) Dispose()

func (*TimeItem) Reset

func (item *TimeItem) Reset()

func (*TimeItem) String

func (item *TimeItem) String() string

type TimeList

type TimeList struct {

	// 静止
	InStasis bool
	// contains filtered or unexported fields
}

定时器

func NewTimeList

func NewTimeList() *TimeList

func (*TimeList) CreateItem

func (timer *TimeList) CreateItem(completeTime int, host ITimeHandler, params ...interface{}) *TimeItem

目标时间

func (*TimeList) Dispose

func (timer *TimeList) Dispose()

func (*TimeList) GetItems

func (timer *TimeList) GetItems() []*TimeItem

func (*TimeList) GetTimerById

func (timer *TimeList) GetTimerById(id int) *TimeItem

func (*TimeList) NextItemId

func (timer *TimeList) NextItemId() int

func (*TimeList) Refresh

func (timer *TimeList) Refresh(item *TimeItem)

func (*TimeList) RefreshById

func (timer *TimeList) RefreshById(timerId int)

func (*TimeList) Remove

func (timer *TimeList) Remove(item *TimeItem)

func (*TimeList) RemoveById

func (timer *TimeList) RemoveById(timerId int)

func (*TimeList) Reset

func (timer *TimeList) Reset()

重置定时器到初始状态

func (*TimeList) Update

func (timer *TimeList) Update(now int, ctx interface{}, params ...interface{})

Jump to

Keyboard shortcuts

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