libfuncs is collection of code (list, queue, circular buffer, io, logging, etc.). https://georgi.unixsol.org/programs/libfuncs/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

misc.h 599B

1234567891011121314151617181920
  1. /*
  2. * Misc functions header file
  3. * Copyright (C) 2010 Unix Solutions Ltd.
  4. *
  5. * Released under MIT license.
  6. * See LICENSE-MIT.txt for license terms.
  7. */
  8. #ifndef MISC_H
  9. #define MISC_H
  10. #include <sys/time.h>
  11. int xstrcmp(char *a, char *b);
  12. unsigned long long timediff_nsec(struct timespec *start_ts, struct timespec *end_ts);
  13. unsigned long long timeval_diff_usec(struct timeval *start_ts, struct timeval *end_ts);
  14. unsigned long long timeval_diff_msec(struct timeval *start_ts, struct timeval *end_ts);
  15. unsigned long long timeval_diff_sec (struct timeval *start_ts, struct timeval *end_ts);
  16. #endif