+/**
+ * \brief Returns the start time of a task
+ *
+ * The task state must be SD_RUNNING, SD_DONE or SD_FAILED.
+ *
+ * \param task: a task
+ * \return the start time of this task
+ */
+double SD_task_get_start_time(SD_task_t task) {
+ SD_CHECK_INIT_DONE();
+ xbt_assert0(task != NULL, "Invalid parameter");
+ if(task->surf_action)
+ return surf_workstation_resource->common_public->action_get_start_time(task->surf_action);
+ else
+ return task->start_time;
+}
+
+/**
+ * \brief Returns the finish time of a task
+ *
+ * The task state must be SD_RUNNING, SD_DONE or SD_FAILED.
+ * If the state is not completed yet, the returned value is an
+ * estimation of the task finish time. This value can fluctuate
+ * until the task is completed.
+ *
+ * \param task: a task
+ * \return the start time of this task
+ */
+double SD_task_get_finish_time(SD_task_t task) {
+ SD_CHECK_INIT_DONE();
+ xbt_assert0(task != NULL, "Invalid parameter");
+
+ if(task->surf_action)
+ return surf_workstation_resource->common_public->action_get_finish_time(task->surf_action); /* should never happen as actions are destroyed right after their completion */
+ else
+ return task->finish_time;
+}
+
+/**
+ * \brief Destroys a task.
+ *
+ * The user data (if any) should have been destroyed first.
+ *
+ * \param task the task you want to destroy
+ * \see SD_task_create()