add timing of synchronous execution
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52702 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
#include "wx/numdlg.h"
|
||||
#include "wx/textdlg.h"
|
||||
#include "wx/ffile.h"
|
||||
#include "wx/stopwatch.h"
|
||||
|
||||
#include "wx/process.h"
|
||||
|
||||
@@ -762,13 +763,15 @@ void MyFrame::OnExecWithRedirect(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
if ( sync )
|
||||
{
|
||||
wxLogStatus( _T("'%s' is running please wait..."), cmd.c_str() );
|
||||
wxLogStatus("\"%s\" is running please wait...", cmd);
|
||||
|
||||
wxStopWatch sw;
|
||||
|
||||
wxArrayString output, errors;
|
||||
int code = wxExecute(cmd, output, errors);
|
||||
|
||||
wxLogStatus(_T("Command '%s' terminated with exit code %d."),
|
||||
cmd.c_str(), code);
|
||||
wxLogStatus("Command \"%s\" terminated after %ldms; exit code %d.",
|
||||
cmd, sw.Time(), code);
|
||||
|
||||
if ( code != -1 )
|
||||
{
|
||||
|
Reference in New Issue
Block a user