util

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter struct {
	sync.Mutex        // 内嵌互斥锁,用于同步
	Num        uint16 // Num 用于存储计数值
}

Counter 是一个带有互斥锁的计数器结构体

func (*Counter) GetNum

func (this *Counter) GetNum() uint16

GetNum 是 Counter 的方法,用于获取当前计数值并自增

Jump to

Keyboard shortcuts

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