Index: drupal_unit_tests.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/drupal_unit_tests.php,v
retrieving revision 1.5
diff -u -p -r1.5 drupal_unit_tests.php
--- drupal_unit_tests.php	25 Aug 2006 18:32:12 -0000	1.5
+++ drupal_unit_tests.php	6 Jul 2007 16:22:35 -0000
@@ -106,7 +106,7 @@ class DrupalUnitTests extends DrupalGrou
     // Disable known problematic modules
     $this->drupalModuleDisable('devel');
     
-    parent::run($reporter);
+    $this->timed_run($reporter, "total");
 
     // Restores modules
     foreach ($this->_cleanupModules as $name => $status) {
@@ -115,6 +115,20 @@ class DrupalUnitTests extends DrupalGrou
     $this->_cleanupModules = array();
 
   }
+
+  /**
+   * Adds timing information when running a test (requires loadtest)
+   */
+  function timed_run(&$reporter, $name) {
+    if (module_exists("loadtest")) {
+      $stime = loadtest_starttimer($name);
+      parent::run($reporter);
+      loadtest_stoptimer($stime, $reporter, $name);
+    }
+    else {
+      parent::run($reporter);
+    }
+  }
   
   /**
    * Enables a drupal module
