[Reconnoiter-devel] [reconnoiter commit] Reconnoiter branch, master, updated. 658ca094d9985caeb69da119a4a9ebc6f063e8b7

git at labs.omniti.com git at labs.omniti.com
Wed Apr 18 17:23:35 EDT 2012


Pushed by: bclapper
The branch, master has been updated
       via  658ca094d9985caeb69da119a4a9ebc6f063e8b7 (commit)
      from  685b9f90a88faa546c2b5959e4f0530d4ae37f58 (commit)

Summary of changes:
 src/noit_conf_checks.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

Log:
commit 658ca094d9985caeb69da119a4a9ebc6f063e8b7
Author: Brian Clapper <bclapper at omniti.com>
Date:   Wed Apr 18 17:23:00 2012 -0400

    display next run time of checks on show check ... console dialog

diff --git a/src/noit_conf_checks.c b/src/noit_conf_checks.c
index 5e571c4..89c0a5d 100644
--- a/src/noit_conf_checks.c
+++ b/src/noit_conf_checks.c
@@ -492,6 +492,17 @@ noit_console_show_check(noit_console_closure_t ncct,
       if(NOIT_CHECK_DISABLED(check)) nc_printf(ncct, "%sdisabled", idx++?",":"");
       if(!idx) nc_printf(ncct, "idle");
       nc_write(ncct, "\n", 1);
+      if (check->fire_event != NULL) {
+        struct timeval now, diff;
+        gettimeofday(&now, NULL);
+        sub_timeval(check->fire_event->whence, now, &diff);
+        nc_printf(ncct, " next run: %0.3f seconds\n",
+                diff.tv_sec + (diff.tv_usec / 1000000.0));
+      }
+      else {
+        nc_printf(ncct, " next run: unscheduled\n");
+      }
+
       if(check->stats.current.whence.tv_sec == 0) {
         nc_printf(ncct, " last run: never\n");
       }




hooks/post-receive
-- 
Reconnoiter


More information about the Reconnoiter-devel mailing list