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

LoopActionCreateLoopAction(Int32, TimeSpan, ActionLoopAction) 方法

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

Definition

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

参数

count  Int32
循环执行次数。
interval  TimeSpan
两次执行操作之间的间隔时间。
action  ActionLoopAction
要执行的异步操作。

返回值

LoopAction
一个新的 LoopAction 实例。

参见