/* Receive message from a message queue within abstime time. 
See IEEE 1003.1  */
int mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime)
/* Receive message from a message queue within abstime time. 
See IEEE 1003.1  */
int mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime)
{
	mqueue_desc *mqd = (mqueue_desc *)mqdes;
	int32_t timeout = (int32_t) timespec_to_timeoutms(abstime);
	return receive_message(mqd, msg_ptr, msg_len, K_MSEC(timeout));
}