xutil

package
v0.0.0-...-2824937 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MarjoVersion string
	MinorVersion string
	PatchVersion string
	GApp         = Application{}
)

版本

Functions

func FileClose

func FileClose(f *Flock)

Types

type App

type App interface {
	Run(f func(int64))
	Init() bool
	Distroy()
}

接口数据

type Application

type Application struct {
	FrameTime      time.Duration
	FrameTimeTotal time.Duration

	InitOKTime time.Time // 初始化完成计时
	// contains filtered or unexported fields
}

实现接口的结构

func (*Application) Distroy

func (this *Application) Distroy()

func (*Application) Init

func (this *Application) Init(f func(int64)) bool

func (*Application) Run

func (this *Application) Run(f func(int64))

帧同步函数

func (*Application) SetFps

func (this *Application) SetFps(needFps int) *Application

设置fps

func (*Application) SetPidFile

func (this *Application) SetPidFile(pidFile string) *Application

设置PID file

func (*Application) SetVersion

func (this *Application) SetVersion(major, minor, patch int) *Application

设置版本

type Flock

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

func NewFolck

func NewFolck(fileName string) (*Flock, error)

NewFolck ...

Jump to

Keyboard shortcuts

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