Lines Matching refs:timespec
7 Timer - struct timespec conversion runtimes and easy to use functions to
149 struct timespec libc_ts;
586 * Checks that timespec is valid, i.e. that the timestamp is not zero and that
589 * 0: On success, i.e. timespec updated correctly.
590 * -1: Error, timespec not updated.
607 * Converts timespec to tst_ts.
609 static inline struct tst_ts tst_ts_from_timespec(struct timespec ts)
621 * Converst tst_ts into timespec.
623 static inline struct timespec tst_ts_to_timespec(struct tst_ts t)
646 * Converts timespec to microseconds and rounds the value.
648 static inline long long tst_timespec_to_us(struct timespec ts)
663 * Converts timespec to milliseconds and rounds the value.
665 static inline long long tst_timespec_to_ms(struct timespec ts)
699 * Converts microseconds to timespec
701 static inline struct timespec
722 * Converts miliseconds to timespec
724 static inline struct timespec
735 struct timespec tp = tst_timespec_from_us(usec);
746 struct timespec tp = tst_timespec_from_us(usec);
784 static inline int tst_timespec_lt(struct timespec ts1, struct timespec ts2)
825 * Adds us microseconds to struct timespec.
827 static inline struct timespec
828 tst_timespec_add_us(struct timespec ts, long long us)
852 * Substracts us microseconds from timespec.
854 static inline struct timespec
855 tst_timespec_sub_us(struct timespec ts, long long us)
879 * Adds two timespec structures.
881 static inline struct timespec
882 tst_timespec_add(struct timespec ts1, struct timespec ts2)
906 * Substract two timespec structures.
908 static inline struct timespec
909 tst_timespec_diff(struct timespec ts1, struct timespec ts2)
928 * Substract two timespec structures returns number of nanoseconds.
931 tst_timespec_diff_ns(struct timespec ts1, struct timespec ts2)
946 * Substract two timespec structures returns number of microseconds.
949 tst_timespec_diff_us(struct timespec ts1, struct timespec ts2)
964 * Substract two timespec structures returns number of milliseconds.
967 tst_timespec_diff_ms(struct timespec ts1, struct timespec ts2)
973 * Returns absolute value of difference between two timespec structures.
995 * Returns absolute value of difference between two timespec structures in
999 tst_timespec_abs_diff_us(struct timespec ts1, struct timespec ts2)
1005 * Returns absolute value of difference between two timespec structures in
1045 * Retuns elapsed time in struct timespec.
1047 struct timespec tst_timer_elapsed(void);