MCPcopy Create free account
hub / github.com/ElementsProject/lightning / time_to_usec

Function time_to_usec

ccan/ccan/time/time.h:573–579  ·  view source on GitHub ↗

* 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())); * */

Source from the content-addressed store, hash-verified

571 *
572 */
573static 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

Callers 6

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
least_costFunction · 0.85
measure_least_costFunction · 0.85

Calls

no outgoing calls

Tested by 2

mainFunction · 0.68
mainFunction · 0.68