+void cmd_sent(cmd_t* cmd)
+{
+ if(!cmd)
+ return;
+
+ cmd->sent = 1;
+ gettimeofday(&cmd->tv_start, NULL);
+}
+
+int cmd_has_expired(cmd_t cmd)
+{
+ struct timeval now;
+ timerclear(&now);
+ gettimeofday(&now, NULL);
+ cmd.tv_start.tv_sec++;
+
+ return timercmp(&cmd.tv_start, &now, <);
+}
+