]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/adaptation/icap/History.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / adaptation / icap / History.h
index 3c3c35c8b2f90545d301e0495dd73b6bbb3216e9..93a381433c3281eb7150259eb2bf58e25242bf77 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
 #ifndef SQUID_ICAPHISTORY_H
 #define SQUID_ICAPHISTORY_H
 
@@ -24,11 +32,12 @@ public:
     /// note the end of an ICAP processing interval
     void stop(const char *context);
 
-    /// returns the total time of all ICAP processing intervals
-    int processingTime() const;
+    /// the total time of all ICAP processing intervals
+    /// \param[out] total time taken for all ICAP processing
+    void processingTime(struct timeval &total) const;
 
     String rfc931; ///< the username from ident
-#if USE_SSL
+#if USE_OPENSSL
     String ssluser; ///< the username from SSL
 #endif
     LogTags logType; ///< the squid request status (TCP_MISS etc)
@@ -37,10 +46,10 @@ public:
     size_t req_sz; ///< the request size
 
 private:
-    int currentTime() const; ///< time since current start or zero
+    void currentTime(struct timeval &) const; ///< time since current start or zero
 
     timeval currentStart; ///< when the current processing interval started
-    int pastTime;         ///< sum of closed processing interval durations
+    struct timeval pastTime; ///< sum of closed processing interval durations
     int concurrencyLevel; ///< number of concurrent processing threads
 };
 
@@ -48,3 +57,4 @@ private:
 } // namespace Adaptation
 
 #endif /*SQUID_HISTORY_H*/
+