private void SetupTimerPorSegundo() { var timerSegundo = new Timer(1000) { Enabled = true, AutoReset = true }; timerSegundo.Elapsed += (s, e) => { if (Timesheet.TarefaEmExecucao) { try { Timesheet.AtualizarTempoPorSegundo(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } }; }