The give_device_time_to_process() routine unconditionally calculated
with a "time since last command transmission" value which may not have
been assigned to in the first invocation of a getter or setter.
Just don't sleep at all when nothing was sent before. Avoids a
dependency on implementation details of signed integer math.
{
int64_t sleeping_time;
+ if (!devc->req_sent_at)
+ return;
+
sleeping_time = devc->req_sent_at + (DEVICE_PROCESSING_TIME_MS * 1000);
sleeping_time -= g_get_monotonic_time();