*
* @return 0 if no error \n
* FRSH_ERR_BAD_ARGUMENT : if any of the pointers is NULL
- * or if only one of the timespec values is 0, and also if the
+ * or if only one of the time values is 0, and also if the
* workload or the contract type values are unknown in the
* enumerations.
**/
int frsh_contract_set_basic_params
(frsh_contract_t *contract,
- const struct timespec *budget_min,
- const struct timespec *period_max,
+ const frsh_rel_time_t *budget_min,
+ const frsh_rel_time_t *period_max,
const frsh_workload_t workload,
const frsh_contract_type_t contract_type);
**/
int frsh_contract_get_basic_params
(const frsh_contract_t *contract,
- struct timespec *budget_min,
- struct timespec *period_max,
+ frsh_rel_time_t *budget_min,
+ frsh_rel_time_t *period_max,
frsh_workload_t *workload,
frsh_contract_type_t *contract_type);
int frsh_contract_set_timing_reqs
(frsh_contract_t *contract,
const bool d_equals_t,
- const struct timespec *deadline,
+ const frsh_rel_time_t *deadline,
const frsh_signal_t budget_overrun_signal,
const frsh_signal_info_t budget_overrun_siginfo,
const frsh_signal_t deadline_miss_signal,
int frsh_contract_get_timing_reqs
(const frsh_contract_t *contract,
bool *d_equals_t,
- struct timespec *deadline,
+ frsh_rel_time_t *deadline,
frsh_signal_t *budget_overrun_signal,
frsh_signal_info_t *budget_overrun_siginfo,
frsh_signal_t *deadline_miss_signal,
**/
int frsh_synchobj_wait
(const frsh_synchobj_handle_t synch_handle,
- struct timespec *next_budget,
- struct timespec *next_period,
+ frsh_rel_time_t *next_budget,
+ frsh_rel_time_t *next_period,
bool *was_deadline_missed,
bool *was_budget_overran);
**/
int frsh_synchobj_wait_with_timeout
(const frsh_synchobj_handle_t synch_handle,
- const struct timespec *abs_timeout,
+ const frsh_abs_time_t *abs_timeout,
bool *timed_out,
- struct timespec *next_budget,
- struct timespec *next_period,
+ frsh_rel_time_t *next_budget,
+ frsh_rel_time_t *next_period,
bool *was_deadline_missed,
bool *was_budget_overran);
* @sa frsh_synchobj_wait, frsh_synchobj_wait_with_timeout
**/
int frsh_timed_wait
- (const struct timespec *abs_time,
- struct timespec *next_budget,
- struct timespec *next_period,
+ (const frsh_abs_time_t *abs_time,
+ frsh_rel_time_t *next_budget,
+ frsh_rel_time_t *next_period,
bool *was_deadline_missed,
bool *was_budget_overran);
**/
int frsh_vres_get_usage
(const frsh_vres_id_t vres,
- struct timespec *spent);
+ frsh_rel_time_t *spent);
+
+
+/**
+ * frsh_vres_get_job_usage()
+ *
+ * Get the execution time of the current job of the specified virtual
+ * resource for a bounded or synchronized workload.
+ **/
+int frsh_vres_get_job_usage
+ (const frsh_vres_id_t vres,
+ frsh_rel_time_t *spent);
+
/**
* frsh_vres_get_remaining_budget()
**/
int frsh_vres_get_remaining_budget
(const frsh_vres_id_t vres,
- struct timespec *budget);
+ frsh_rel_time_t *budget);
/**
**/
int frsh_vres_get_budget_and_period
(const frsh_vres_id_t vres,
- struct timespec *budget,
- struct timespec *period);
+ frsh_rel_time_t *budget,
+ frsh_rel_time_t *period);
/*@}*/
* has been cancelled or it is not valid
*
**/
-int frsh_service_thread_set_data (const struct timespec *budget,
- const struct timespec *period,
+int frsh_service_thread_set_data (const frsh_rel_time_t *budget,
+ const frsh_rel_time_t *period,
bool *accepted);
/**
*
**/
int frsh_service_thread_get_data
- (struct timespec *budget,
- struct timespec *period);
+ (frsh_rel_time_t *budget,
+ frsh_rel_time_t *period);
/*@}*/