Quitado los cronometros para mejorar la performance
This commit is contained in:
parent
72256a214c
commit
210b93b15a
|
@ -50,9 +50,6 @@ namespace LibS7Adv
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
private IInstance Instance { get; set; }
|
private IInstance Instance { get; set; }
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
private Stopwatch stopwatch = new Stopwatch();
|
|
||||||
|
|
||||||
private bool IsConfigured { get; set; }
|
private bool IsConfigured { get; set; }
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
|
@ -335,10 +332,7 @@ namespace LibS7Adv
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
stopwatch.Restart();
|
|
||||||
Instance?.WriteBool(pTag, pValue);
|
Instance?.WriteBool(pTag, pValue);
|
||||||
stopwatch.Stop();
|
|
||||||
Debug.WriteLine($" EscribirTagBool took {stopwatch.Elapsed.TotalMilliseconds} ms");
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -349,10 +343,7 @@ namespace LibS7Adv
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
stopwatch.Restart();
|
|
||||||
Instance?.WriteInt16(pTag, (short)pValue);
|
Instance?.WriteInt16(pTag, (short)pValue);
|
||||||
stopwatch.Stop();
|
|
||||||
Debug.WriteLine($" EscribirTagInt16 took {stopwatch.Elapsed.TotalMilliseconds} ms");
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -364,10 +355,7 @@ namespace LibS7Adv
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
stopwatch.Restart();
|
|
||||||
bool result = Instance?.ReadBool(pTag) ?? false;
|
bool result = Instance?.ReadBool(pTag) ?? false;
|
||||||
stopwatch.Stop();
|
|
||||||
Debug.WriteLine($" LeerTagBool took {stopwatch.Elapsed.TotalMilliseconds} ms");
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -381,10 +369,7 @@ namespace LibS7Adv
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
stopwatch.Restart();
|
|
||||||
int? result = Instance?.ReadInt16(pTag);
|
int? result = Instance?.ReadInt16(pTag);
|
||||||
stopwatch.Stop();
|
|
||||||
Debug.WriteLine($" LeerTagInt16 took {stopwatch.Elapsed.TotalMilliseconds} ms");
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -398,10 +383,7 @@ namespace LibS7Adv
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
stopwatch.Restart();
|
|
||||||
int? result = Instance?.ReadInt32(pTag);
|
int? result = Instance?.ReadInt32(pTag);
|
||||||
stopwatch.Stop();
|
|
||||||
Debug.WriteLine($" LeerTagDInt took {stopwatch.Elapsed.TotalMilliseconds} ms");
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -415,10 +397,7 @@ namespace LibS7Adv
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
stopwatch.Restart();
|
|
||||||
Instance?.WriteInt32(pTag, pValue);
|
Instance?.WriteInt32(pTag, pValue);
|
||||||
stopwatch.Stop();
|
|
||||||
Debug.WriteLine($" EscribirTagDInt took {stopwatch.Elapsed.TotalMilliseconds} ms");
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue