+
+/** \ingroup msg_gos_functions
+ * \brief Sleep for the specified number of seconds
+ *
+ * Makes the current process sleep until \a time seconds have elapsed.
+ *
+ * \param nb_sec a number of second
+ */
+MSG_error_t MSG_process_sleep(double nb_sec)
+{
+ e_smx_state_t state;
+ /*m_process_t proc = MSG_process_self();*/
+
+#ifdef HAVE_TRACING
+ TRACE_msg_process_sleep_in(MSG_process_self());
+#endif
+
+ /* create action to sleep */
+ state = SIMIX_req_process_sleep(nb_sec);
+
+ /*proc->simdata->waiting_action = act_sleep;
+
+ FIXME: check if not setting the waiting_action breaks something on msg
+
+ proc->simdata->waiting_action = NULL;*/
+
+ if (state == SIMIX_DONE) {
+#ifdef HAVE_TRACING
+ TRACE_msg_process_sleep_out(MSG_process_self());
+#endif
+ MSG_RETURN(MSG_OK);
+ } else {
+#ifdef HAVE_TRACING
+ TRACE_msg_process_sleep_out(MSG_process_self());
+#endif
+ MSG_RETURN(MSG_HOST_FAILURE);
+ }
+}
+
+/** \ingroup msg_gos_functions
+ * \brief Listen on \a channel and waits for receiving a task from \a host.
+ *
+ * It takes three parameters.
+ * \param task a memory location for storing a #m_task_t. It will
+ hold a task when this function will return. Thus \a task should not
+ be equal to \c NULL and \a *task should be equal to \c NULL. If one of
+ those two condition does not hold, there will be a warning message.
+ * \param channel the channel on which the agent should be
+ listening. This value has to be >=0 and < than the maximal
+ number of channels fixed with MSG_set_channel_number().
+ * \param host the host that is to be watched.
+ * \return #MSG_FATAL if \a task is equal to \c NULL, #MSG_WARNING
+ if \a *task is not equal to \c NULL, and #MSG_OK otherwise.
+ */
+MSG_error_t
+MSG_task_get_from_host(m_task_t * task, m_channel_t channel, m_host_t host)
+{
+ return MSG_task_get_ext(task, channel, -1, host);
+}
+