一款简单易用的基础网络通讯组件库。

LoopActionCreateLoopAction(Int32, Int32, ActionLoopAction) 方法

创建并返回一个 LoopAction 实例,该实例将在指定次数和以毫秒为单位的间隔下执行给定的异步操作。

Definition

命名空间: TouchSocket.Core
程序集: TouchSocket.Core (在 TouchSocket.Core.dll 中) 版本:3.0.0+ccaf96084d09f972257496d1dd63b8ba3c1e44f0
C#
public static LoopAction CreateLoopAction(
	int count,
	int intervalMS,
	Action<LoopAction> action
)

参数

count  Int32
循环执行次数。
intervalMS  Int32
两次执行操作之间的间隔时间(毫秒)。
action  ActionLoopAction
要执行的异步操作。

返回值

LoopAction
一个新的 LoopAction 实例。

参见