Searched refs:unix_ms (Results 1 – 3 of 3) sorted by relevance
37 int bt_cts_time_to_unix_ms(const struct bt_cts_time_format *ct_time, int64_t *unix_ms) in bt_cts_time_to_unix_ms() argument53 (*unix_ms) = timeutil_timegm64(&date_time); in bt_cts_time_to_unix_ms()54 if ((*unix_ms) == ((time_t)-1)) { in bt_cts_time_to_unix_ms()57 LOG_DBG("CTS Write Unix: %lld", (*unix_ms)); in bt_cts_time_to_unix_ms()58 (*unix_ms) *= MSEC_PER_SEC; in bt_cts_time_to_unix_ms()60 (*unix_ms) += ((ct_time->fractions256 * MSEC_PER_SEC) / BT_CTS_FRACTION_256_MAX_VALUE); in bt_cts_time_to_unix_ms()65 int bt_cts_time_from_unix_ms(struct bt_cts_time_format *ct_time, int64_t unix_ms) in bt_cts_time_from_unix_ms() argument68 time_t unix_ts = unix_ms / MSEC_PER_SEC; in bt_cts_time_from_unix_ms()71 unix_ms %= MSEC_PER_SEC; in bt_cts_time_from_unix_ms()72 unix_ms *= BT_CTS_FRACTION_256_MAX_VALUE; in bt_cts_time_from_unix_ms()[all …]
124 int bt_cts_time_to_unix_ms(const struct bt_cts_time_format *ct_time, int64_t *unix_ms);137 int bt_cts_time_from_unix_ms(struct bt_cts_time_format *ct_time, int64_t unix_ms);
368 int64_t unix_ms; in bt_cts_cts_time_write() local371 err = bt_cts_time_to_unix_ms(cts_time, &unix_ms); in bt_cts_cts_time_write()380 unix_ms_ref = unix_ms - k_uptime_get(); in bt_cts_cts_time_write()386 int64_t unix_ms = unix_ms_ref + k_uptime_get(); in bt_cts_fill_current_cts_time() local389 return bt_cts_time_from_unix_ms(cts_time, unix_ms); in bt_cts_fill_current_cts_time()