Index: drupal_test_case.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/drupal_test_case.php,v
retrieving revision 1.28
diff -u -p -r1.28 drupal_test_case.php
--- drupal_test_case.php	24 Jun 2007 08:05:07 -0000	1.28
+++ drupal_test_case.php	6 Jul 2007 16:22:53 -0000
@@ -394,10 +394,23 @@ class DrupalTestCase extends WebTestCase
       $arr = array_merge($arr, $this->get_info());
     }
     $reporter->test_info_stack[] = $arr;
-    parent::run($reporter);
+    $this->timed_run($reporter, $arr['class']);
     array_pop($reporter->test_info_stack);
   }
 
+  /**
+   * Adds timing information when running a test (requires loadtest)
+   */
+  function timed_run(&$reporter, $name) {
+    if (module_exists("loadtest")) {
+      $stime = loadtest_starttimer();
+      parent::run($reporter);
+      loadtest_stoptimer($stime, $reporter, $name);
+    }
+    else {
+      parent::run($reporter);
+    }
+  }
   
         /**
          *    Will trigger a pass if the raw text is found on the loaded page
