static xbt_dict_t trace_list = NULL;
-tmgr_history_t tmgr_history_new(void)
+XBT_INLINE tmgr_history_t tmgr_history_new(void)
{
tmgr_history_t h;
return h;
}
-void tmgr_history_free(tmgr_history_t h)
+XBT_INLINE void tmgr_history_free(tmgr_history_t h)
{
xbt_heap_free(h->heap);
free(h);
}
tmgr_trace_t tmgr_trace_new_from_string(const char *id, const char *input,
- double periodicity, double timestep)
+ double periodicity)
{
tmgr_trace_t trace = NULL;
int linecount = 0;
if (sscanf(val, "PERIODICITY " "%lg" "\n", &periodicity) == 1)
continue;
- if (sscanf(val, "TIMESTEP " "%lg" "\n", ×tep) == 1)
- continue;
-
if (sscanf(val, "%lg" " " "%lg" "\n", &event.delta, &event.value) != 2)
xbt_die(bprintf
("%s:%d: Syntax error in trace\n%s", id, linecount, input));
if (last_event)
last_event->delta = periodicity;
- trace->timestep = timestep;
-
if (!trace_list)
trace_list = xbt_dict_new();
char *tstr = xbt_str_from_file(f);
fclose(f);
- trace = tmgr_trace_new_from_string(filename, tstr, 0., 10.);
+ trace = tmgr_trace_new_from_string(filename, tstr, 0.);
xbt_free(tstr);
return trace;
return trace;
}
-void tmgr_trace_free(tmgr_trace_t trace)
+XBT_INLINE void tmgr_trace_free(tmgr_trace_t trace)
{
if (!trace)
return;
return trace_event;
}
-double tmgr_history_next_date(tmgr_history_t h)
+XBT_INLINE double tmgr_history_next_date(tmgr_history_t h)
{
if (xbt_heap_size(h->heap))
return (xbt_heap_maxkey(h->heap));
return trace_event;
}
-void tmgr_finalize(void)
+XBT_INLINE void tmgr_finalize(void)
{
xbt_dict_free(&trace_list);
}