End Google Ads 201810 - BS.net 01 -->
Need to time stamp the last time a file was considered good.
I was trying to use something like: last_Time = DateTime.Now;. This is used inside a decision block. The problem even if the condition to enter the particular block isn't met, it still updates.
So does DateTime.Now execute no matter what?
Now for what I really need. I need to timestamp a infopacket/file/situation as to the last time it passed inspection. In other words when was the last good infopacket/file/situation.
The following code is what I thought would work:
public static DateTime last_Time;
public void Packet_Check(int decision)
{ /* checks for last good info packet. checks from lightest to most sever.
* if decision = 0, add 1 to pass_counter
* if decision = 1, pass_counter = 0, good packet and timestamps
*/
/*
int pass_marker = 0;// make global
int pass_counter = 0;// make global
int first_check = 0; // make global bool used if first pass made
*/
pass_counter++;
if (decision == 1)
{
stateIndicatorComponent2.StateIndex = 4;
pass_counter = 0;
last_Time = DateTime.Now; //
مواقع النشر (المفضلة)