static void print_upnp_time(char *result, size_t size, gint64 t) {
	const gint64 one_sec = 1000000000LL;  // units are in nanoseconds.
	const int hour = divide_leave_remainder(&t, 3600LL * one_sec);
	const int minute = divide_leave_remainder(&t, 60LL * one_sec);
	const int second = divide_leave_remainder(&t, one_sec);
	snprintf(result, size, "%d:%02d:%02d", hour, minute, second);
}
static void print_upnp_time_into_buffer(char *buf, size_t size, gint64 t) {
	const gint64 one_sec = 1000000000LL;  // units are in nanoseconds.
	const int hour = divide_leave_remainder(&t, 3600LL * one_sec);
	const int minute = divide_leave_remainder(&t, 60LL * one_sec);
	const int second = divide_leave_remainder(&t, one_sec);
	const int milli_second = t / 1000000;
	snprintf(buf, size, "%d:%02d:%02d.%03d", hour, minute, second,
		 milli_second);
}
static void print_upnp_time(char *result, size_t size, gint64 t) {
	const int hour = divide_leave_remainder(&t, 3600);
	const int minute = divide_leave_remainder(&t, 60);
	const int second = divide_leave_remainder(&t, 1);
	snprintf(result, size, "%d:%02d:%02d", hour, minute, second);
}