Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.762
diff -u -p -r1.762 common.inc
--- includes/common.inc	31 Mar 2008 20:50:05 -0000	1.762
+++ includes/common.inc	8 Apr 2008 22:20:33 -0000
@@ -2525,8 +2525,23 @@ function drupal_cron_run() {
     // Lock cron semaphore
     variable_set('cron_semaphore', time());
 
+    // If you want to log cron timings for each module to the watchdog, 
+    // then add the following line to your settings.php:
+    // 
+    // $conf = array ('cron_log_times' => 1);
+    $log_timing = variable_get('cron_log_times', 0);
     // Iterate through the modules calling their cron handlers (if any):
-    module_invoke_all('cron');
+    foreach (module_implements('cron') as $module) {
+      $function = $module .'_cron';
+      if ($log_timing) {
+        timer_start($function);
+      }
+      $function();
+      if ($log_timing) {
+        $timer = timer_stop($function);
+        watchdog('cron', 'Cron time elapsed for @module is @millisecs ms.', array('@module' => $module, '@millisecs' => $timer['time']));
+      }
+    }
 
     // Record cron time
     variable_set('cron_last', time());
Index: sites/default/default.settings.php
===================================================================
RCS file: /cvs/drupal/drupal/sites/default/default.settings.php,v
retrieving revision 1.9
diff -u -p -r1.9 default.settings.php
--- sites/default/default.settings.php	21 Mar 2008 09:16:37 -0000	1.9
+++ sites/default/default.settings.php	8 Apr 2008 22:20:33 -0000
@@ -214,6 +214,17 @@ ini_set('url_rewriter.tags',        '');
 # );
 
 /**
+ * Cron timing:
+ * 
+ * Enable the following setting to make cron log the time, in milliseconds,
+ * taken for execution of each hook_cron in all modules that implement it. This
+ * is helpful if the cron run is not completing within its time-limit or is
+ * taking a long time. The messages are logged to the watchdog, so you can see
+ * them in dblog or syslog, depending on which one you have configured.
+ */
+# $conf['cron_log_times'] = 1;
+
+/**
  * String overrides:
  *
  * To override specific strings on your site with or without enabling locale
