Lines Matching refs:timespec
27 * \file timespec.h
29 * Helpers to deal with timespec structures.
52 timespec_add(struct timespec *r,
53 const struct timespec *a, const struct timespec *b)
71 timespec_sub(struct timespec *r,
72 const struct timespec *a, const struct timespec *b)
87 * Add a nanosecond value to a timespec
90 * \param a[in] base operand as timespec
95 timespec_add_nsec(struct timespec *r, const struct timespec *a, uint64_t b)
120 * Add a millisecond value to a timespec
123 * \param a[in] base operand as timespec
128 timespec_add_msec(struct timespec *r, const struct timespec *a, uint64_t b)
134 * Convert timespec to nanoseconds
136 * \param a timespec
140 timespec_to_nsec(const struct timespec *a)
153 timespec_sub_to_nsec(const struct timespec *a, const struct timespec *b)
155 struct timespec r;
161 * Convert timespec to milliseconds
163 * \param a timespec
169 timespec_to_msec(const struct timespec *a)
182 timespec_sub_to_msec(const struct timespec *a, const struct timespec *b)
188 * Convert timespec to microseconds
190 * \param a timespec
196 timespec_to_usec(const struct timespec *a)
202 * Convert timespec to protocol data
204 * \param a timespec
209 * The input timespec must be normalized (the nanoseconds part should
213 timespec_to_proto(const struct timespec *a, uint32_t *tv_sec_hi,
227 * Convert nanoseconds to timespec
229 * \param a timespec
233 timespec_from_nsec(struct timespec *a, uint64_t b)
240 * Convert microseconds to timespec
242 * \param a timespec
246 timespec_from_usec(struct timespec *a, uint64_t b)
252 * Convert milliseconds to timespec
254 * \param a timespec
258 timespec_from_msec(struct timespec *a, uint64_t b)
264 * Convert protocol data to timespec
266 * \param a[out] timespec
272 timespec_from_proto(struct timespec *a, uint32_t tv_sec_hi,
280 * Check if a timespec is zero
282 * \param a timespec
283 * \return whether the timespec is zero
286 timespec_is_zero(const struct timespec *a)
294 * \param a[in] timespec to check
295 * \param b[in] timespec to check
299 timespec_eq(const struct timespec *a, const struct timespec *b)
319 * Checks whether a timespec value is after another
321 * \param a[in] timespec to compare
322 * \param b[in] timespec to compare
326 timespec_after(const struct timespec *a, const struct timespec *b)