|
@@ -16,6 +16,7 @@ using System.Net;
|
|
|
using System.Net.Sockets;
|
|
|
using System.Linq;
|
|
|
using System.Text.RegularExpressions;
|
|
|
+using System.Diagnostics;
|
|
|
|
|
|
namespace MOKA_Factory_Tools
|
|
|
{
|
|
@@ -1457,7 +1458,8 @@ namespace MOKA_Factory_Tools
|
|
|
ArrayList keypath = new ArrayList();
|
|
|
ArrayList keyStream = new ArrayList();
|
|
|
ArrayList keyReader = new ArrayList();
|
|
|
- int SerailDelay = FunctionSettingNow.SerailDelay;
|
|
|
+ //int SerailDelay = FunctionSettingNow.SerailDelay;
|
|
|
+ int SerailDelay = FunctionSettingNow.NextCommandWaitTime;
|
|
|
|
|
|
Log.WriteInfoLog(SN + " start testing");
|
|
|
bool TestResult = false;
|
|
@@ -1539,6 +1541,9 @@ namespace MOKA_Factory_Tools
|
|
|
// 如果是G客户,要在抄写其他key前时行fsn+psn查重处理;
|
|
|
if (WriteDSN.Checked)
|
|
|
{
|
|
|
+ // 计算函数耗时;
|
|
|
+ Stopwatch watch = new Stopwatch();
|
|
|
+ watch.Start();
|
|
|
if (SN == null)
|
|
|
{
|
|
|
MessageBox.Show("Please scan to trigger testing");
|
|
@@ -1642,6 +1647,9 @@ namespace MOKA_Factory_Tools
|
|
|
MessageBox.Show(LResource.GetDeviceCodeError);
|
|
|
goto end;
|
|
|
}
|
|
|
+
|
|
|
+ watch.Stop();
|
|
|
+ Log.WriteInfoLog(string.Format("Write DSN Elapsed={0}", watch.Elapsed.TotalMilliseconds));
|
|
|
}
|
|
|
|
|
|
// 如果是要导出ACASID+SN,先判断ACASID是否等于20位长度;
|
|
@@ -2034,6 +2042,9 @@ namespace MOKA_Factory_Tools
|
|
|
}
|
|
|
else if (!preloadNow)
|
|
|
{
|
|
|
+ // 计算获取全部key耗时;
|
|
|
+ Stopwatch watch = new Stopwatch();
|
|
|
+ watch.Start();
|
|
|
if (WriteDID.Checked)
|
|
|
{
|
|
|
if (CommonMethod.GetKeys(midListNow.host, "DeviceID", SN, "devicetype=tcl_unknown_model", errorDBNow, out string did, out error, orderNow, out string md5))
|
|
@@ -2313,6 +2324,8 @@ namespace MOKA_Factory_Tools
|
|
|
goto end;
|
|
|
}
|
|
|
}
|
|
|
+ watch.Stop();
|
|
|
+ Log.WriteInfoLog(string.Format("Get All Keys Elapsed={0}", watch.Elapsed.TotalMilliseconds));
|
|
|
}
|
|
|
|
|
|
// 如果是抄写EDID,则不获取白平衡数据;
|
|
@@ -5860,7 +5873,7 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
timer1.Stop();
|
|
|
}
|
|
|
- while (WritekeyThread.ThreadState != ThreadState.Aborted)
|
|
|
+ while (WritekeyThread.ThreadState != System.Threading.ThreadState.Aborted)
|
|
|
{
|
|
|
Thread.Sleep(100);
|
|
|
}
|