Changeset View
Changeset View
Standalone View
Standalone View
agent/protect.c
Context not available. | |||||
#include <stdio.h> | #include <stdio.h> | ||||
#include <stdlib.h> | #include <stdlib.h> | ||||
#include <string.h> | #include <string.h> | ||||
#include <time.h> | |||||
#include <ctype.h> | #include <ctype.h> | ||||
#include <assert.h> | #include <assert.h> | ||||
#include <unistd.h> | #include <unistd.h> | ||||
Context not available. | |||||
&data->creation_time, &data->exit_time, | &data->creation_time, &data->exit_time, | ||||
&data->kernel_time, &data->user_time); | &data->kernel_time, &data->user_time); | ||||
# endif | # endif | ||||
#elif defined (CLOCK_THREAD_CPUTIME_ID) | |||||
struct timespec tmp; | |||||
clock_gettime (CLOCK_THREAD_CPUTIME_ID, &tmp); | |||||
data->ticks = (clock_t)(((unsigned long long)tmp.tv_sec * 1000000000 + | |||||
tmp.tv_nsec) * CLOCKS_PER_SEC / 1000000000); | |||||
#else | #else | ||||
struct tms tmp; | struct tms tmp; | ||||
Context not available. |