Browse Source

wxGUI: add debug message to print startup time (cosmetics)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@64507 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 10 years ago
parent
commit
fa3796315d
1 changed files with 7 additions and 1 deletions
  1. 7 1
      gui/wxpython/wxgui.py

+ 7 - 1
gui/wxpython/wxgui.py

@@ -21,9 +21,11 @@ This program is free software under the GNU General Public License
 import os
 import os
 import sys
 import sys
 import getopt
 import getopt
+import time
 
 
 from core import globalvar
 from core import globalvar
 from core.utils import _
 from core.utils import _
+from core.debug import Debug
 
 
 from grass.exceptions import Usage
 from grass.exceptions import Usage
 from grass.script.core import set_raise_on_error
 from grass.script.core import set_raise_on_error
@@ -126,12 +128,16 @@ def main(argv = None):
         printHelp()
         printHelp()
 
 
     workspaceFile = process_opt(opts, args)[0]
     workspaceFile = process_opt(opts, args)[0]
-
+    
+    start = time.time()
+    
     app = GMApp(workspaceFile)
     app = GMApp(workspaceFile)
     # suppress wxPython logs
     # suppress wxPython logs
     q = wx.LogNull()
     q = wx.LogNull()
     set_raise_on_error(True)
     set_raise_on_error(True)
 
 
+    Debug.msg(1, "wxGUI started in %.6f sec" % (time.time() - start))
+    
     app.MainLoop()
     app.MainLoop()
 
 
 if __name__ == "__main__":
 if __name__ == "__main__":