| 1 | #include "acl_cpp/lib_acl.hpp" |
| 2 | |
| 3 | double stamp_sub(const struct timeval *from, const struct timeval *sub) |
| 4 | { |
| 5 | struct timeval res; |
| 6 | |
| 7 | memcpy(&res, from, sizeof(struct timeval)); |
| 8 | |
| 9 | res.tv_usec -= sub->tv_usec; |
| 10 | if (res.tv_usec < 0) { |
| 11 | --res.tv_sec; |
| 12 | res.tv_usec += 1000000; |
| 13 | } |
| 14 | res.tv_sec -= sub->tv_sec; |
| 15 | |
| 16 | return (res.tv_sec * 1000.0 + res.tv_usec/1000.0); |
| 17 | } |
| 18 | |
| 19 | class mythread : public acl::thread |
| 20 | { |
no test coverage detected
searching dependent graphs…