My code pings a list of urls, it then stores the results in a database. It then sends a generic email when a ping within the database is below 1000ms. I want the code to be able to send an email only if the ping was within the last 24 hours. What can I use for the time frame?
DateTime now = DateTime.Now;
DateTime yesterday = now.AddDays(-1);
if ((int)response >= 1000)
{
SendEmailPageloadFailed();
}
}
Aucun commentaire:
Enregistrer un commentaire