#include <sys/time.h>
#include <sys/resource.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
Go to the source code of this file.
◆ rt_s_useconds
#define rt_s_useconds |
( |
|
rt | ) |
|
Value:(((double)rt.rut2.ru_stime.tv_usec + \
(double)rt.rut2.ru_stime.tv_sec*1000000) \
- ((double)rt.rut1.ru_stime.tv_usec + \
(double)rt.rut1.ru_stime.tv_sec*1000000))
Definition at line 107 of file rtimer.h.
Referenced by rt_sprint_safe().
◆ rt_seconds
◆ rt_sprint
◆ rt_start
Value:if((getrusage(RUSAGE_SELF, &rt.rut1) < 0) \
|| (gettimeofday(&(rt.tv1),
NULL) < 0)) { \
perror("rusage/gettimeofday"); \
exit(1); \
}
Definition at line 84 of file rtimer.h.
◆ rt_stop
Value:if((getrusage(RUSAGE_SELF, &rt.rut2) < 0) \
|| (gettimeofday(&(rt.tv2),
NULL) < 0)) { \
perror("rusage/gettimeofday"); \
exit(1); \
}
Definition at line 93 of file rtimer.h.
◆ rt_u_useconds
#define rt_u_useconds |
( |
|
rt | ) |
|
Value:(((double)rt.rut2.ru_utime.tv_usec + \
(double)rt.rut2.ru_utime.tv_sec*1000000) \
- ((double)rt.rut1.ru_utime.tv_usec + \
(double)rt.rut1.ru_utime.tv_sec*1000000))
Definition at line 101 of file rtimer.h.
Referenced by rt_sprint_safe().
◆ rt_w_useconds
#define rt_w_useconds |
( |
|
rt | ) |
|
Value:(((double)rt.tv2.tv_usec + \
(double)rt.tv2.tv_sec*1000000) \
- ((double)rt.tv1.tv_usec + \
(double)rt.tv1.tv_sec*1000000))
Definition at line 113 of file rtimer.h.
Referenced by rt_sprint_safe().
◆ rt_zero
#define rt_zero |
( |
|
rt | ) |
bzero(&(rt),sizeof(Rtimer)); |
◆ rt_sprint_safe()
char* rt_sprint_safe |
( |
char * |
buf, |
|
|
Rtimer |
rt |
|
) |
| |