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.

common.h 435B

  1. #ifndef COMMON_H
  2. #define COMMON_H
  3. #define _POSIX_C_SOURCE 199309L
  4. #include <time.h>
  5. unsigned get_cpu_count(void);
  6. struct timespec get_time(void);
  7. struct timespec time_diff(struct timespec* ts1, struct timespec* ts2);
  8. struct timespec get_duration(struct timespec* ts);
  9. void print_time(struct timespec* ts);
  10. int* read_int_array(unsigned n);
  11. void read_input(int** array, unsigned* n);
  12. void print_array(int* array, unsigned n);
  13. #endif