private void ButtonSave_Click(object sender, RoutedEventArgs e) { Stopwatch time = Stopwatch.StartNew(); AfrikaKataster.Uloz(); time.Stop(); var cas = time.Elapsed; MessageBox.Show("Ulozene time: " + cas, "OK"); }