| ulib/gettime.c | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 0 | 6 | 0.0 |
| branch | n/a | ||
| condition | n/a | ||
| subroutine | n/a | ||
| pod | n/a | ||
| total | 0 | 6 | 0.0 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | #ifdef __cplusplus | ||||||
| 2 | extern "C" { | ||||||
| 3 | #endif | ||||||
| 4 | |||||||
| 5 | #include "ulib/gettime.h" | ||||||
| 6 | |||||||
| 7 | #ifdef __cplusplus | ||||||
| 8 | } | ||||||
| 9 | #endif | ||||||
| 10 | |||||||
| 11 | 0 | U64 gt_100ns64(pUCXT) { | |||||
| 12 | struct timeval tv; | ||||||
| 13 | U64 rv; | ||||||
| 14 | UV ptod[2]; | ||||||
| 15 | |||||||
| 16 | /* gettimeofday(&tv, 0); */ | ||||||
| 17 | 0 | (*UCXT.myU2time)(aTHX_ (UV*)&ptod); | |||||
| 18 | 0 | tv.tv_sec = (long)ptod[0]; | |||||
| 19 | 0 | tv.tv_usec = (long)ptod[1]; | |||||
| 20 | |||||||
| 21 | 0 | rv = tv.tv_sec * 10000000 + tv.tv_usec * 10; | |||||
| 22 | 0 | return rv; | |||||
| 23 | } | ||||||
| 24 | |||||||
| 25 | /* ex:set ts=2 sw=2 itab=spaces: */ |