diff --git a/daemon/call.c b/daemon/call.c
index f92f04ff2..ad55b5b37 100644
--- a/daemon/call.c
+++ b/daemon/call.c
@@ -79,7 +79,7 @@ static struct media_subscription *__subscribe_medias_both_ways(struct call_media
 static int call_timer_delete_monologues(call_t *c) {
 	struct call_monologue *ml;
 	int ret = 0;
-	time_t min_deleted = 0;
+	int64_t min_deleted = 0;
 	bool update = false;
 
 	/* we need a write lock here */
@@ -89,11 +89,11 @@ static int call_timer_delete_monologues(call_t *c) {
 	for (__auto_type i = c->monologues.head; i; i = i->next) {
 		ml = i->data;
 
-		if (!ml->deleted)
+		if (!ml->deleted_us)
 			continue;
-		if (ml->deleted > timeval_from_us(rtpe_now).tv_sec) {
-			if (!min_deleted || ml->deleted < min_deleted)
-				min_deleted = ml->deleted;
+		if (ml->deleted_us > rtpe_now) {
+			if (!min_deleted || ml->deleted_us < min_deleted)
+				min_deleted = ml->deleted_us;
 			continue;
 		}
 
@@ -101,7 +101,7 @@ static int call_timer_delete_monologues(call_t *c) {
 		update = true;
 	}
 
-	c->ml_deleted = min_deleted;
+	c->ml_deleted_us = min_deleted;
 
 	rwlock_unlock_w(&c->master_lock);
 	if (update)
@@ -141,7 +141,7 @@ static void call_timer_iterator(call_t *c, struct iterator_helper *hlp) {
 
 	// final timeout applicable to all calls (own and foreign)
 	if (atomic_get_na(&rtpe_config.final_timeout)
-			&& timeval_from_us(rtpe_now).tv_sec >= (timeval_from_us(c->created).tv_sec + atomic_get_na(&rtpe_config.final_timeout)))
+			&& rtpe_now >= (c->created + atomic_get_na(&rtpe_config.final_timeout) * 1000000LL)) // XXX scale to micro
 	{
 		ilog(LOG_INFO, "Closing call due to final timeout");
 		tmp_t_reason = FINAL_TIMEOUT;
@@ -159,11 +159,11 @@ static void call_timer_iterator(call_t *c, struct iterator_helper *hlp) {
 		goto out;
 	}
 
-	if (c->deleted && timeval_from_us(rtpe_now).tv_sec >= c->deleted
-			&& c->last_signal <= c->deleted)
+	if (c->deleted_us && rtpe_now >= c->deleted_us
+			&& c->last_signal_us <= c->deleted_us)
 		goto delete;
 
-	if (c->ml_deleted && timeval_from_us(rtpe_now).tv_sec >= c->ml_deleted) {
+	if (c->ml_deleted_us && rtpe_now >= c->ml_deleted_us) {
 		if (call_timer_delete_monologues(c))
 			goto delete;
 	}
@@ -174,7 +174,7 @@ static void call_timer_iterator(call_t *c, struct iterator_helper *hlp) {
 
 	// ignore media timeout if call was recently taken over
 	if (CALL_ISSET(c, FOREIGN_MEDIA)
-			&& timeval_from_us(rtpe_now).tv_sec - c->last_signal <= atomic_get_na(&rtpe_config.timeout))
+			&& rtpe_now - c->last_signal_us <= atomic_get_na(&rtpe_config.timeout) * 1000000L) // XXX scale to micro
 		goto out;
 
 	ice_fragments_cleanup(c->sdp_fragments, false);
@@ -237,14 +237,14 @@ no_sfd:
 		if (good)
 			goto next;
 
-		check = atomic_get_na(&rtpe_config.timeout) * 1000000L; // XXX scale to micro
+		check = atomic_get_na(&rtpe_config.timeout) * 1000000LL; // XXX scale to micro
 		tmp_t_reason = TIMEOUT;
 		if (!MEDIA_ISSET(ps->media, RECV) || !sfd) {
-			check = atomic_get_na(&rtpe_config.silent_timeout) * 1000000L; // XXX scale to micro
+			check = atomic_get_na(&rtpe_config.silent_timeout) * 1000000LL; // XXX scale to micro
 			tmp_t_reason = SILENT_TIMEOUT;
 		}
 		else if (!PS_ISSET(ps, FILLED)) {
-			check = atomic_get_na(&rtpe_config.offer_timeout) * 1000000L; // XXX scale to micro
+			check = atomic_get_na(&rtpe_config.offer_timeout) * 1000000LL; // XXX scale to micro
 			tmp_t_reason = OFFER_TIMEOUT;
 		}
 
@@ -277,7 +277,7 @@ next:
 		goto out;
 	}
 
-	if (c->ml_deleted)
+	if (c->ml_deleted_us)
 		goto out;
 
 	for (__auto_type it = c->monologues.head; it; it = it->next) {
@@ -2720,8 +2720,8 @@ static void __call_monologue_init_from_flags(struct call_monologue *ml, struct c
 {
 	call_t *call = ml->call;
 
-	call->last_signal = timeval_from_us(rtpe_now).tv_sec;
-	call->deleted = 0;
+	call->last_signal_us = rtpe_now;
+	call->deleted_us = 0;
 	call->media_rec_slots = (flags->media_rec_slots > 0 && call->media_rec_slots == 0)
 								? flags->media_rec_slots
 								: call->media_rec_slots;
@@ -4087,14 +4087,14 @@ void call_destroy(call_t *c) {
 
 		// stats output only - no cleanups
 
-		ilog(LOG_INFO, "--- Tag '" STR_FORMAT_M "'%s"STR_FORMAT"%s, created "
+		ilog(LOG_INFO, "--- Tag '" STR_FORMAT_M "'%s" STR_FORMAT "%s, created "
 				"%u:%02u ago for branch '" STR_FORMAT_M "'",
 				STR_FMT_M(&ml->tag),
 				ml->label.s ? " (label '" : "",
 				STR_FMT(ml->label.s ? &ml->label : &STR_EMPTY),
 				ml->label.s ? "')" : "",
-				(unsigned int) (timeval_from_us(rtpe_now).tv_sec - ml->created) / 60,
-				(unsigned int) (timeval_from_us(rtpe_now).tv_sec - ml->created) % 60,
+				(unsigned int) ((rtpe_now - ml->created_us) / 1000000LL) / 60,
+				(unsigned int) ((rtpe_now - ml->created_us) / 1000000LL) % 60,
 				STR_FMT_M(&ml->viabranch));
 
 		for (__auto_type alias = ml->tag_aliases.head; alias; alias = alias->next)
@@ -4199,12 +4199,12 @@ void call_destroy(call_t *c) {
 					se->average_mos.mos / mos_samples % 10,
 					se->lowest_mos->mos / 10,
 					se->lowest_mos->mos % 10,
-					((se->lowest_mos->reported - c->created) / 1000000) / 60,
-					((se->lowest_mos->reported - c->created) / 1000000) % 60,
+					((se->lowest_mos->reported - c->created) / 1000000L) / 60,
+					((se->lowest_mos->reported - c->created) / 1000000L) % 60,
 					se->highest_mos->mos / 10,
 					se->highest_mos->mos % 10,
-					((se->highest_mos->reported - c->created) / 1000000) / 60,
-					((se->highest_mos->reported - c->created) / 1000000) % 60,
+					((se->highest_mos->reported - c->created) / 1000000L) / 60,
+					((se->highest_mos->reported - c->created) / 1000000L) % 60,
 					(unsigned int) se->packets_lost);
 				ilog(LOG_INFO, "------ respective (avg/min/max) jitter %" PRIu64 "/%" PRIu64 "/%" PRIu64 " ms, "
 						"RTT-e2e %" PRIu64 ".%" PRIu64 "/%" PRIu64 ".%" PRIu64
@@ -4679,7 +4679,7 @@ struct call_monologue *__monologue_create(call_t *call) {
 	ret = uid_alloc(&call->monologues);
 
 	ret->call = call;
-	ret->created = timeval_from_us(rtpe_now).tv_sec;
+	ret->created_us = rtpe_now;
 	ret->associated_tags = g_hash_table_new(g_direct_hash, g_direct_equal);
 	ret->medias = medias_arr_new();
 	ret->media_ids = media_id_ht_new();
@@ -4870,7 +4870,7 @@ void monologue_destroy(struct call_monologue *monologue) {
 		}
 	}
 
-	monologue->deleted = 0;
+	monologue->deleted_us = 0;
 }
 
 /* must be called with call->master_lock held in W */
@@ -4897,9 +4897,9 @@ static bool monologue_delete_iter(struct call_monologue *a, int delete_delay) {
 		ilog(LOG_INFO, "Scheduling deletion of call branch '" STR_FORMAT_M "' "
 				"(via-branch '" STR_FORMAT_M "') in %d seconds",
 				STR_FMT_M(&a->tag), STR_FMT0_M(&a->viabranch), delete_delay);
-		a->deleted = timeval_from_us(rtpe_now).tv_sec + delete_delay;
-		if (!call->ml_deleted || call->ml_deleted > a->deleted)
-			call->ml_deleted = a->deleted;
+		a->deleted_us = rtpe_now + delete_delay * 1000000LL; // XXX scale to micro
+		if (!call->ml_deleted_us || call->ml_deleted_us > a->deleted_us)
+			call->ml_deleted_us = a->deleted_us;
 	}
 	else {
 		ilog(LOG_INFO, "Deleting call branch '" STR_FORMAT_M "' (via-branch '" STR_FORMAT_M "')",
@@ -4956,8 +4956,8 @@ struct call_monologue *call_get_or_create_monologue(call_t *call, const str *fro
  * associated with another one, which happens during offer/answer.
  */
 static void __tags_associate(struct call_monologue *a, struct call_monologue *b) {
-	a->deleted = 0;
-	b->deleted = 0;
+	a->deleted_us = 0;
+	b->deleted_us = 0;
 	g_hash_table_insert(a->associated_tags, b, b);
 	g_hash_table_insert(b->associated_tags, a, a);
 }
@@ -5357,7 +5357,7 @@ del_all:
 
 	if (delete_delay > 0) {
 		ilog(LOG_INFO, "Scheduling deletion of entire call in %d seconds", delete_delay);
-		c->deleted = timeval_from_us(rtpe_now).tv_sec + delete_delay;
+		c->deleted_us = rtpe_now + delete_delay * 1000000LL; // XXX scale to micro
 		rwlock_unlock_w(&c->master_lock);
 	}
 	else {
diff --git a/daemon/call_interfaces.c b/daemon/call_interfaces.c
index 660f20a0e..90b945091 100644
--- a/daemon/call_interfaces.c
+++ b/daemon/call_interfaces.c
@@ -448,7 +448,7 @@ static void call_status_iterator(call_t *c, struct streambuf_stream *s) {
 
 	streambuf_printf(s->outbuf, "session "STR_FORMAT" - - - - %" PRId64 "\n",
 		STR_FMT(&c->callid),
-		(rtpe_now - c->created) / 1000000);
+		(rtpe_now - c->created) / 1000000L);
 
 	/* XXX restore function */
 
@@ -2796,9 +2796,9 @@ static void ng_stats_stream(ng_command_ctx_t *ctx, parser_arg list, const struct
 	if (ps->crypto.params.crypto_suite)
 		parser->dict_add_string(dict, "crypto suite",
 				ps->crypto.params.crypto_suite->name);
-	parser->dict_add_int(dict, "last packet", packet_stream_last_packet(ps) / 1000000LL);
-	parser->dict_add_int(dict, "last kernel packet", atomic64_get_na(&ps->stats_in->last_packet_us) / 1000000LL);
-	parser->dict_add_int(dict, "last user packet", atomic64_get_na(&ps->last_packet_us) / 1000000LL);
+	parser->dict_add_int(dict, "last packet", packet_stream_last_packet(ps) / 1000000L);
+	parser->dict_add_int(dict, "last kernel packet", atomic64_get_na(&ps->stats_in->last_packet_us) / 1000000L);
+	parser->dict_add_int(dict, "last user packet", atomic64_get_na(&ps->last_packet_us) / 1000000L);
 
 	flags = parser->dict_add_list(dict, "flags");
 
@@ -2931,7 +2931,7 @@ static void ng_stats_monologue(ng_command_ctx_t *ctx, parser_arg dict, const str
 	}
 	if (ml->label.s)
 		parser->dict_add_str(sub, "label", &ml->label);
-	parser->dict_add_int(sub, "created", ml->created);
+	parser->dict_add_int(sub, "created", ml->created_us / 1000000L);
 	if (ml->metadata.s)
 		parser->dict_add_str(sub, "metadata", &ml->metadata);
 
@@ -3013,7 +3013,7 @@ static void ng_stats_ssrc_mos_entry(const ng_parser_t *parser, parser_arg subent
 		struct ssrc_stats_block *sb)
 {
 	ng_stats_ssrc_mos_entry_common(parser, subent, sb, 1);
-	parser->dict_add_int(subent, "reported at", sb->reported / 1000000);
+	parser->dict_add_int(subent, "reported at", sb->reported / 1000000L);
 }
 static void ng_stats_ssrc_mos_entry_dict(const ng_parser_t *parser, parser_arg ent, const char *label,
 		struct ssrc_stats_block *sb)
@@ -3058,7 +3058,7 @@ static void ng_stats_ssrc(const ng_parser_t *parser, parser_arg dict, const stru
 			= ((struct ssrc_stats_block *) se->stats_blocks.tail->data)->reported
 			- sb->reported;
 		interval /= 10;
-		parser->dict_add_int(progdict, "interval", interval / 1000000);
+		parser->dict_add_int(progdict, "interval", interval / 1000000L);
 		int64_t next_step = sb->reported;
 		parser_arg entlist = parser->dict_add_list(progdict, "entries");
 
@@ -3095,10 +3095,10 @@ void ng_call_stats(ng_command_ctx_t *ctx, call_t *call, const str *fromtag, cons
 
 	parser = ctx->parser_ctx.parser;
 
-	parser->dict_add_int(ctx->resp, "created", call->created / 1000000);
-	parser->dict_add_int(ctx->resp, "created_us", call->created % 1000000);
+	parser->dict_add_int(ctx->resp, "created", call->created / 1000000L);
+	parser->dict_add_int(ctx->resp, "created_us", call->created % 1000000L);
 	parser->dict_add_int(ctx->resp, "created_ts", call->created);
-	parser->dict_add_int(ctx->resp, "last signal", call->last_signal);
+	parser->dict_add_int(ctx->resp, "last signal", call->last_signal_us / 1000000L);
 	parser->dict_add_int(ctx->resp, "last redis update", atomic64_get_na(&call->last_redis_update));
 	if (call->metadata.s)
 		parser->dict_add_str(ctx->resp, "metadata", &call->metadata);
diff --git a/daemon/cdr.c b/daemon/cdr.c
index 8206b4837..dddc904b7 100644
--- a/daemon/cdr.c
+++ b/daemon/cdr.c
@@ -48,7 +48,7 @@ void cdr_update_entry(call_t * c) {
 	if (_log_facility_cdr) {
 		g_string_append_printf(cdr, "ci=%s, ",c->callid.s);
 		g_string_append_printf(cdr, "created_from=%s, ", c->created_from);
-		g_string_append_printf(cdr, "last_signal=%llu, ", (unsigned long long)c->last_signal);
+		g_string_append_printf(cdr, "last_signal=%" PRId64 ", ", c->last_signal_us / 1000000L);
 		g_string_append_printf(cdr, "tos=%u, ", (unsigned int)c->tos);
 	}
 
diff --git a/daemon/cli.c b/daemon/cli.c
index bb6c5a652..c8adbb51e 100644
--- a/daemon/cli.c
+++ b/daemon/cli.c
@@ -363,7 +363,7 @@ next:;
 	// destroy calls
 	call_t *c = NULL;
 	while ((c = t_queue_pop_head(&calls))) {
-		if (!c->ml_deleted) {
+		if (!c->ml_deleted_us) {
 			for (__auto_type i = c->monologues.head; i; i = i->next) {
 				ml = i->data;
 				ml->terminated = rtpe_now;
@@ -695,14 +695,14 @@ static void cli_list_call_info(struct cli_writer *cw, call_t *c) {
 			 "created: %" PRId64 "\n"
 			 "proxy: %s\n"
 			 "tos: %u\n"
-			 "last_signal: %llu\n"
+			 "last_signal: %" PRId64 "\n"
 			 "redis_keyspace: %i\n"
 			 "last redis update: %llu\n"
 			 "foreign: %s\n"
 			 "recording: %s\n"
 			 "\n",
-			 c->callid.s, c->ml_deleted ? "yes" : "no", c->created / 1000000, c->created_from,
-			 (unsigned int) c->tos, (unsigned long long) c->last_signal, c->redis_hosted_db,
+			 c->callid.s, c->ml_deleted_us ? "yes" : "no", c->created / 1000000, c->created_from,
+			 (unsigned int) c->tos, c->last_signal_us / 1000000L, c->redis_hosted_db,
 			 (unsigned long long) atomic64_get_na(&c->last_redis_update),
 			 IS_FOREIGN_CALL(c) ? "yes" : "no", c->recording ? "yes" : "no");
 
@@ -868,7 +868,7 @@ static void cli_incoming_list_sessions(str *instr, struct cli_writer *cw, const
 		found = true;
 
 		cw->cw_printf(cw, "ID: %60s | del:%s | creat:%12" PRId64 " | prx:%s | redis:%2i | frgn:%s | rec:%s\n",
-				call->callid.s, call->ml_deleted ? "y" : "n",
+				call->callid.s, call->ml_deleted_us ? "y" : "n",
 				call->created / 1000000,
 				call->created_from, call->redis_hosted_db,
 				IS_FOREIGN_CALL(call) ? "y" : "n",
@@ -1129,7 +1129,7 @@ static void cli_incoming_terminate(str *instr, struct cli_writer *cw, const cli_
        return;
    }
 
-   if (!c->ml_deleted) {
+   if (!c->ml_deleted_us) {
 	   for (__auto_type i = c->monologues.head; i; i = i->next) {
 		   ml = i->data;
 		   ml->terminated = rtpe_now;
@@ -1248,10 +1248,10 @@ static void cli_incoming_active_standby(struct cli_writer *cw, bool foreign) {
 	ITERATE_CALL_LIST_START(CALL_ITERATOR_MAIN, c);
 		rwlock_lock_w(&c->master_lock);
 		call_make_own_foreign(c, foreign);
-		c->last_signal = MAX(c->last_signal, timeval_from_us(rtpe_now).tv_sec);
+		c->last_signal_us = MAX(c->last_signal_us, rtpe_now);
 		if (!foreign) {
 			CALL_SET(c, FOREIGN_MEDIA); // ignore timeout until we have media
-			c->last_signal++; // we are authoritative now
+			c->last_signal_us++; // we are authoritative now
 		}
 		rwlock_unlock_w(&c->master_lock);
 		redis_update_onekey(c, rtpe_redis_write);
diff --git a/daemon/media_socket.c b/daemon/media_socket.c
index 32d456fb0..ad13d9297 100644
--- a/daemon/media_socket.c
+++ b/daemon/media_socket.c
@@ -1878,7 +1878,7 @@ void kernelize(struct packet_stream *stream) {
 		g_free(redi);
 	}
 
-	stream->kernel_time = timeval_from_us(rtpe_now).tv_sec;
+	stream->kernel_time_us = rtpe_now;
 	PS_SET(stream, KERNELIZED);
 	return;
 
@@ -1886,7 +1886,7 @@ no_kernel_warn:
 	ilog(LOG_WARNING, "No support for kernel packet forwarding available (%s)", nk_warn_msg);
 no_kernel:
 	PS_SET(stream, KERNELIZED);
-	stream->kernel_time = timeval_from_us(rtpe_now).tv_sec;
+	stream->kernel_time_us = rtpe_now;
 	PS_SET(stream, NO_KERNEL_SUPPORT);
 }
 
@@ -2508,7 +2508,7 @@ static bool media_packet_address_check(struct packet_handler_ctx *phc)
 	/* wait at least 3 seconds after last signal before committing to a particular
 	 * endpoint address */
 	bool wait_time = false;
-	if (!phc->mp.call->last_signal || timeval_from_us(rtpe_now).tv_sec <= phc->mp.call->last_signal + 3)
+	if (!phc->mp.call->last_signal_us || rtpe_now <= phc->mp.call->last_signal_us + 3000000LL)
 		wait_time = true;
 
 	const struct endpoint *use_endpoint_confirm = &phc->mp.fsin;
diff --git a/daemon/redis.c b/daemon/redis.c
index 71222238a..655ab54b7 100644
--- a/daemon/redis.c
+++ b/daemon/redis.c
@@ -1120,7 +1120,15 @@ static atomic64 strtoa64(const char *c, char **endp, int base) {
 	return ret;
 }
 
-define_get_int_type(time_t, time_t, strtoull);
+static int64_t time_t_conv(const char *c, char **endp, int base) {
+	// hack for compatibility - to be removed XXX
+	int64_t us = strtoll(c, endp, base);
+	if (us < 4000000LL)
+		return us * 1000000L;
+	return us;
+}
+
+define_get_int_type(time_t, int64_t, time_t_conv);
 define_get_int_type(int64_t, int64_t, strtoll);
 define_get_int_type(int, int, strtol);
 define_get_int_type(llu, unsigned long long, strtoll);
@@ -1486,7 +1494,7 @@ static int redis_tags(call_t *c, struct redis_list *tags, parser_arg arg) {
 		if (!ml)
 			return -1;
 
-		if (redis_hash_get_time_t(&ml->created, rh, "created"))
+		if (redis_hash_get_time_t(&ml->created_us, rh, "created"))
 			return -1;
 		if (!redis_hash_get_str(&s, rh, "tag"))
 			__monologue_tag(ml, &s);
@@ -1496,7 +1504,7 @@ static int redis_tags(call_t *c, struct redis_list *tags, parser_arg arg) {
 			ml->label = call_str_cpy(&s);
 		if (!redis_hash_get_str(&s, rh, "metadata"))
 			c->metadata = call_str_cpy(&s);
-		redis_hash_get_time_t(&ml->deleted, rh, "deleted");
+		redis_hash_get_time_t(&ml->deleted_us, rh, "deleted");
 		if (!redis_hash_get_int(&ii, rh, "block_dtmf"))
 			ml->block_dtmf = ii;
 		if (!redis_hash_get_a64(&a64, rh, "ml_flags"))
@@ -2002,7 +2010,7 @@ static void json_restore_call(struct redis *r, const str *callid, bool foreign)
 	struct redis_list tags, sfds, streams, medias, maps;
 	call_t *c = NULL;
 	str s, id;
-	time_t last_signal;
+	int64_t last_signal;
 
 	const char *err = 0;
 	int i;
@@ -2068,13 +2076,13 @@ static void json_restore_call(struct redis *r, const str *callid, bool foreign)
 	if (redis_hash_get_time_t(&last_signal, &call, "last_signal"))
 		goto err3;
 
-	if (c->last_signal) {
+	if (c->last_signal_us) {
 		err = NULL;
 		// is the call we're loading newer than the one we have?
-		if (last_signal > c->last_signal) {
+		if (last_signal > c->last_signal_us) {
 			// switch ownership
 			call_make_own_foreign(c, foreign);
-			c->last_signal = last_signal;
+			c->last_signal_us = last_signal;
 		}
 		goto err3; // no error, just bail
 	}
@@ -2099,13 +2107,13 @@ static void json_restore_call(struct redis *r, const str *callid, bool foreign)
 	if (redis_hash_get_int64_t(&c->created, &call, "created"))
 		goto err8;
 	redis_hash_get_int64_t(&c->destroyed, &call, "destroyed");
-	c->last_signal = last_signal;
+	c->last_signal_us = last_signal;
 	if (redis_hash_get_int(&i, &call, "tos"))
 		c->tos = 184;
 	else
 		c->tos = i;
-	redis_hash_get_time_t(&c->deleted, &call, "deleted");
-	redis_hash_get_time_t(&c->ml_deleted, &call, "ml_deleted");
+	redis_hash_get_time_t(&c->deleted_us, &call, "deleted");
+	redis_hash_get_time_t(&c->ml_deleted_us, &call, "ml_deleted");
 	if (!redis_hash_get_str(&id, &call, "created_from"))
 		c->created_from = call_strdup_str(&id);
 	if (!redis_hash_get_str(&id, &call, "created_from_addr")) {
@@ -2454,15 +2462,15 @@ static str redis_encode_json(ng_parser_ctx_t *ctx, call_t *c, void **to_free) {
 		{
 			JSON_SET_SIMPLE("created","%" PRId64, c->created);
 			JSON_SET_SIMPLE("destroyed","%" PRId64, c->destroyed);
-			JSON_SET_SIMPLE("last_signal","%ld", (long int) c->last_signal);
+			JSON_SET_SIMPLE("last_signal","%" PRId64, c->last_signal_us);
 			JSON_SET_SIMPLE("tos","%u", (int) c->tos);
-			JSON_SET_SIMPLE("deleted","%ld", (long int) c->deleted);
+			JSON_SET_SIMPLE("deleted","%" PRId64, c->deleted_us);
 			JSON_SET_SIMPLE("num_sfds","%u", t_queue_get_length(&c->stream_fds));
 			JSON_SET_SIMPLE("num_streams","%u", t_queue_get_length(&c->streams));
 			JSON_SET_SIMPLE("num_medias","%u", t_queue_get_length(&c->medias));
 			JSON_SET_SIMPLE("num_tags","%u", t_queue_get_length(&c->monologues));
 			JSON_SET_SIMPLE("num_maps","%u", t_queue_get_length(&c->endpoint_maps));
-			JSON_SET_SIMPLE("ml_deleted","%ld", (long int) c->ml_deleted);
+			JSON_SET_SIMPLE("ml_deleted","%" PRId64, c->ml_deleted_us);
 			JSON_SET_SIMPLE_CSTR("created_from", c->created_from);
 			JSON_SET_SIMPLE_CSTR("created_from_addr", sockaddr_print_buf(&c->created_from_addr));
 			JSON_SET_SIMPLE("redis_hosted_db","%u", c->redis_hosted_db);
@@ -2557,8 +2565,8 @@ static str redis_encode_json(ng_parser_ctx_t *ctx, call_t *c, void **to_free) {
 
 			{
 
-				JSON_SET_SIMPLE("created", "%llu", (long long unsigned) ml->created);
-				JSON_SET_SIMPLE("deleted", "%llu", (long long unsigned) ml->deleted);
+				JSON_SET_SIMPLE("created", "%" PRId64, ml->created_us);
+				JSON_SET_SIMPLE("deleted", "%" PRId64, ml->deleted_us);
 				JSON_SET_SIMPLE("block_dtmf", "%i", ml->block_dtmf);
 				JSON_SET_SIMPLE("ml_flags", "%" PRIu64, atomic64_get_na(&ml->ml_flags));
 				JSON_SET_SIMPLE_CSTR("desired_family", ml->desired_family ? ml->desired_family->rfc_name : "");
diff --git a/include/call.h b/include/call.h
index 524e995ab..b5b2ffa93 100644
--- a/include/call.h
+++ b/include/call.h
@@ -445,7 +445,7 @@ struct packet_stream {
 				ssrc_out_idx;				/* LOCK: out_lock */
 	struct send_timer	*send_timer;				/* RO */
 	struct jitter_buffer	*jb;					/* RO */
-	time_t kernel_time;
+	int64_t			kernel_time_us;
 
 	struct stream_stats	*stats_in;
 	struct stream_stats	*stats_out;
@@ -588,8 +588,8 @@ struct call_monologue {
 	str_q			tag_aliases;
 	enum tag_type		tagtype;
 	str			label;
-	time_t			created;		/* RO */
-	time_t			deleted;
+	int64_t			created_us;		/* RO */
+	int64_t			deleted_us;
 	int64_t			started;		/* for CDR */
 	int64_t			terminated;		/* for CDR */
 	enum termination_reason	term_reason;
@@ -770,9 +770,9 @@ struct call {
 	str_q			callid_aliases;
 	int64_t			created;
 	int64_t			destroyed;
-	time_t			last_signal;
-	time_t			deleted;
-	time_t			ml_deleted;
+	int64_t			last_signal_us;
+	int64_t			deleted_us;
+	int64_t			ml_deleted_us;
 	unsigned char		tos;
 	char			*created_from;
 	sockaddr_t		created_from_addr;