]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
monotonic timestamps: document they are milliseconds
authorVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 11 Dec 2017 12:25:18 +0000 (13:25 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 11 Dec 2017 12:25:18 +0000 (13:25 +0100)
lib/cache.h
lib/rplan.h
lib/utils.h

index b6fd92ea0cfc210e2d6628ac92ce4f35cc050fc4..66c6cdb014ef9c1ce28dea340302d2f0e6036f90 100644 (file)
@@ -78,7 +78,7 @@ struct kr_cache
 
        uint32_t ttl_min, ttl_max; /**< Maximum TTL of inserted entries */
        struct timeval last_clear_walltime; /**< Time of last cache clear */
-       uint64_t last_clear_monotime;  /**< Last cache clear in monotonic time */
+       uint64_t last_clear_monotime;  /**< Last cache clear in monotonic milliseconds */
 };
 
 /**
index 6b7487c5b809163d732aa7928d1934f95438beaf..44118ea4cbc5a1a9d38fedf38259f37a79d542f7 100644 (file)
@@ -84,11 +84,11 @@ struct kr_query {
        uint32_t secret;
        uint16_t fails;
        uint16_t reorder; /**< Seed to reorder (cached) RRs in answer or zero. */
-       uint64_t creation_time_mono; /* The time of query's creation.
+       uint64_t creation_time_mono; /* The time of query's creation (milliseconds).
                                 * Or time of creation of an oldest
                                 * ancestor if it is a subquery. */
-       uint64_t timestamp_mono; /**< Time of query created or time of 
-                                 query to upstream resolver */
+       uint64_t timestamp_mono; /**< Time of query created or time of
+                                  * query to upstream resolver (milliseconds). */
        struct timeval timestamp;
        struct kr_zonecut zone_cut;
        struct kr_nsrep ns;
index d688098922cb76cca34b7ef125b8588778fa3479..de727771a4b030ac3edcf5e4d9a28c33c427cdde 100644 (file)
@@ -300,6 +300,10 @@ static inline const char *lua_push_printf(lua_State *L, const char *fmt, ...)
        return ret;
 }
 
+/** The current time in monotonic milliseconds.
+ *
+ * \note it may be outdated in case of long callbacks; see uv_now().
+ */
 KR_EXPORT
 uint64_t kr_now();