* time_to_usec - return number of microseconds * @t: a relative time * * It's often more convenient to deal with time values as * microseconds. Note that this will fit into a 32-bit variable if * it's a time difference of less than ~1 hour. * * Example: * ... * printf("Forking time is %u usec\n", * (unsigned)time_to_usec(forking_time())); * */
| 571 | * |
| 572 | */ |
| 573 | static inline uint64_t time_to_usec(struct timerel t) |
| 574 | { |
| 575 | uint64_t usec; |
| 576 | |
| 577 | usec = TIMEREL_CHECK(t).ts.tv_nsec/1000 + (uint64_t)t.ts.tv_sec*1000000; |
| 578 | return usec; |
| 579 | } |
| 580 | |
| 581 | /** |
| 582 | * time_to_nsec - return number of nanoseconds |
no outgoing calls