]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
move time things around
authorAlan T. DeKok <aland@freeradius.org>
Fri, 11 Nov 2016 00:19:19 +0000 (19:19 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 11 Nov 2016 00:25:34 +0000 (19:25 -0500)
src/util/message.h
src/util/time.c
src/util/time.h

index 5e59c9eb24a097c68e6f98fa491437a84e39bed6..240cd1c180c8cd83d82f043c93a04af8c23f23cb 100644 (file)
@@ -26,6 +26,7 @@
  */
 RCSIDH(message_h, "$Id$")
 
+#include <freeradius-devel/util/time.h>
 #include <freeradius-devel/util/ring_buffer.h>
 
 #ifdef __cplusplus
@@ -44,6 +45,7 @@ typedef enum fr_message_status_t {
 typedef struct fr_message_t {
        fr_message_status_t     status;         //!< free, used, done, etc.
 
+       fr_time_t               when;           //!< when this message was sent
        fr_ring_buffer_t        *rb;            //!< pointer to the ring buffer
        uint8_t                 *data;          //!< pointer to the data in the ring buffer
        size_t                  data_size;      //!< size of the data in the ring buffer
index 2ec9ad80b2366d14d73f56dc813762cf00877f87..fe75756dae95e7da31b9bb1c14dae781fba6fec5 100644 (file)
@@ -44,10 +44,6 @@ USES_APPLE_DEPRECATED_API
 #  include <mach/mach_time.h>
 #endif
 
-#define NANOSEC (1000000000)
-#define USEC   (1000000)
-
-
 static struct timeval tm_started = { 0, 0};
 
 #ifdef HAVE_CLOCK_GETTIME
index 0d496d89362cf1962ebd69833923d52689c472e2..a9576f221af42a6eebe228003e95cf170e5801b1 100644 (file)
@@ -57,12 +57,16 @@ typedef struct fr_time_tracking_t {
        fr_time_t       when;                   //!< last time we changed a field
        fr_time_t       start;                  //!< time this request started being processed
        fr_time_t       end;                    //!< when we stopped processing this request
+       fr_time_t       predicted;              //!< predicted processing time for this request
        fr_time_t       yielded;                //!< time this request yielded
        fr_time_t       resumed;                //!< time this request last resumed;
        fr_time_t       running;                //!< total time spent running
        fr_time_t       waiting;                //!< total time spent waiting
 } fr_time_tracking_t;
 
+#define NANOSEC (1000000000)
+#define USEC   (1000000)
+
 int fr_time_start(void);
 fr_time_t fr_time(void);
 void fr_time_to_timeval(struct timeval *tv, fr_time_t when) CC_HINT(nonnull);