void CalcTimeDiff()
{
bool success = false;
while (!success)
{
try
{
GlobalDateTime.CalcTimeDiff();
success = true;
}
catch
{
SQLiteTimeDiffDAO dao = new SQLiteTimeDiffDAO();
if (dao.Count == 0)
{
Logger.LogInfo("ERROR", "Failed to load server time... attempt to try again.");
Thread.Sleep(2000);
}
else
{
Logger.LogInfo("WARNING", "Failed to load server time... using previous information.");
success = true;
}
}
}
}