public double GetQueryTime(string query)
{
TimeSpan duration;
DateTime start = DateTime.Now;
cmd = new MySqlCommand(query, con);
using (MySqlDataReader rdr = cmd.ExecuteReader())
{
while (rdr.Read()) { };
}
duration = DateTime.Now.Subtract(start);
return duration.TotalMilliseconds;
}