+static int getCommand(UsbCommand* response, uint32_t ms_timeout) {
+
+ struct timespec end_time;
+ clock_gettime(CLOCK_REALTIME, &end_time);
+ end_time.tv_sec += ms_timeout / 1000;
+ end_time.tv_nsec += (ms_timeout % 1000) * 1000000;
+ if (end_time.tv_nsec > 1000000000) {
+ end_time.tv_nsec -= 1000000000;
+ end_time.tv_sec += 1;
+ }