Esempio n. 1
0
void tpoint(char* flag, char* state) {
    pid_t tid = gettid();
    pid_t pid = getpid();
    struct timespec now;
    clock_gettime(CLOCK_REALTIME, &now);
    tracepoint(ptask_provider, ptask_tracepoint, pid, tid, ptask_idx, flag, state, tspec_to_rel(&now, MILLI), _tp[ptask_idx].priority, tspec_to(&_tp[ptask_idx].period, MICRO), tspec_to(&_tp[ptask_idx].deadline, MICRO));
}
Esempio n. 2
0
/*--------------------------------------------------------------*/
long
ptask_gettime (int unit)
{
  tspec t;

  clock_gettime (CLOCK_MONOTONIC, &t);

  return tspec_to_rel (&t, unit);
}