Lines Matching defs:tst_ts
146 struct tst_ts {
163 static inline void *tst_ts_get(struct tst_ts *t)
374 * Returns tst_ts seconds.
376 static inline long long tst_ts_get_sec(struct tst_ts ts)
392 * Returns tst_ts nanoseconds.
394 static inline long long tst_ts_get_nsec(struct tst_ts ts)
410 * Sets tst_ts seconds.
412 static inline void tst_ts_set_sec(struct tst_ts *ts, long long sec)
430 * Sets tst_ts nanoseconds.
432 static inline void tst_ts_set_nsec(struct tst_ts *ts, long long nsec)
593 static inline int tst_ts_valid(struct tst_ts *t)
607 * Converts timespec to tst_ts.
609 static inline struct tst_ts tst_ts_from_timespec(struct timespec ts)
611 struct tst_ts t = {
621 * Converst tst_ts into timespec.
623 static inline struct timespec tst_ts_to_timespec(struct tst_ts t)
629 * Converts tst_ts to nanoseconds.
631 static inline long long tst_ts_to_ns(struct tst_ts t)
637 * Converts tst_ts to microseconds and rounds the value.
639 static inline long long tst_ts_to_us(struct tst_ts t)
654 * Converts tst_ts to milliseconds and rounds the value.
656 static inline long long tst_ts_to_ms(struct tst_ts t)
671 * Converts nanoseconds to tst_ts
673 static inline struct tst_ts
676 struct tst_ts ret = {.type = type};
685 * Converts microseconds to tst_ts
687 static inline struct tst_ts
690 struct tst_ts ret = {.type = type};
708 * Converts miliseconds to tst_ts
710 static inline struct tst_ts
713 struct tst_ts ret = {.type = type};
753 * Sets tst_its it_interval from tst_ts.
755 static inline void tst_its_set_interval_from_ts(struct tst_its *its, struct tst_ts ts)
762 * Sets tst_its it_value from tst_ts.
764 static inline void tst_its_set_value_from_ts(struct tst_its *its, struct tst_ts ts)
773 static inline int tst_ts_lt(struct tst_ts t1, struct tst_ts t2)
790 * Returns normalized tst_ts, i.e. 0 <= nsec < 1000000000.
792 static inline struct tst_ts tst_ts_normalize(struct tst_ts t)
811 * Adds us microseconds to tst_ts.
813 static inline struct tst_ts
814 tst_ts_add_us(struct tst_ts t, long long us)
816 struct tst_ts res = {.type = t.type};
830 struct tst_ts res;
838 * Substracts us microseconds from tst_ts.
840 static inline struct tst_ts
841 tst_ts_sub_us(struct tst_ts t, long long us)
843 struct tst_ts res = {.type = t.type};
857 struct tst_ts res;
865 * Adds two tst_ts structures.
867 static inline struct tst_ts
868 tst_ts_add(struct tst_ts t1, struct tst_ts t2)
870 struct tst_ts res = {.type = t1.type};
884 struct tst_ts res;
892 * Substract two tst_ts structures.
894 static inline struct tst_ts
895 tst_ts_diff(struct tst_ts t1, struct tst_ts t2)
897 struct tst_ts res = {.type = t1.type};
911 struct tst_ts res;
919 * Substract two tst_ts structures returns number of nanoseconds.
922 tst_ts_diff_ns(struct tst_ts t1, struct tst_ts t2)
937 * Substract two tst_ts structures returns number of microseconds.
940 tst_ts_diff_us(struct tst_ts t1, struct tst_ts t2)
955 * Substract two tst_ts structures returns number of milliseconds.
958 tst_ts_diff_ms(struct tst_ts t1, struct tst_ts t2)
975 static inline struct tst_ts
976 tst_ts_abs_diff(struct tst_ts t1, struct tst_ts t2)
985 * Returns absolute value of difference between two tst_ts structures in
989 tst_ts_abs_diff_us(struct tst_ts t1, struct tst_ts t2)
1009 tst_ts_abs_diff_ms(struct tst_ts t1, struct tst_ts t2)