This commit is contained in:
luosheng
2023-02-20 17:40:20 +08:00
parent 052e91cce2
commit 70b54adf80

View File

@@ -44,7 +44,7 @@ namespace Modbus.Net
/// <returns></returns> /// <returns></returns>
public static async Task<MachineGetJobScheduler> CreateScheduler(string triggerKey, int count = 0, int intervalSecond = 1) public static async Task<MachineGetJobScheduler> CreateScheduler(string triggerKey, int count = 0, int intervalSecond = 1)
{ {
return await CreateScheduler(triggerKey, count, intervalSecond); return await CreateScheduler(triggerKey, count, (double)intervalSecond);
} }
/// <summary> /// <summary>
@@ -56,7 +56,7 @@ namespace Modbus.Net
/// <returns></returns> /// <returns></returns>
public static async Task<MachineGetJobScheduler> CreateSchedulerMillisecond(string triggerKey, int count = 0, int intervalMilliSecond = 1000) public static async Task<MachineGetJobScheduler> CreateSchedulerMillisecond(string triggerKey, int count = 0, int intervalMilliSecond = 1000)
{ {
return await CreateScheduler(triggerKey, count, intervalMilliSecond / 1000.0); return await CreateScheduler(triggerKey, count, (double)intervalMilliSecond / 1000.0);
} }
private static async Task<MachineGetJobScheduler> CreateScheduler(string triggerKey, int count = 0, double interval = 1) private static async Task<MachineGetJobScheduler> CreateScheduler(string triggerKey, int count = 0, double interval = 1)