using Common.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using static Common.Attributes.ATSCommandAttribute;
namespace Command
{
[ATSCommand]
[DeviceCategory("延时指令")]
public static class Delay
{
///
/// 等待_毫秒
///
///
///
///
public static async Task Delay_ms(int millisecond, CancellationToken ct)
{
await Task.Delay(millisecond, ct);
}
///
/// 等待_秒
///
///
///
///
public static async Task Delay_s(float second, CancellationToken ct)
{
await Task.Delay((int)second * 1000, ct);
}
///
/// 等待_分钟
///
///
///
///
public static async Task Delay_m(float minnute, CancellationToken ct)
{
await Task.Delay((int)minnute * 60 * 1000, ct);
}
///
/// 等待_小时
///
///
///
///
public static async Task Delay_h(float hour, CancellationToken ct)
{
await Task.Delay((int)hour* 60 * 60 * 1000, ct);
}
}
}