Changeset View
Changeset View
Standalone View
Standalone View
sys/net/altq/altq_subr.c
Show First 20 Lines • Show All 1,021 Lines • ▼ Show 20 Lines | read_machclk(void) | ||||
if (machclk_usepcc) { | if (machclk_usepcc) { | ||||
#if defined(__amd64__) || defined(__i386__) | #if defined(__amd64__) || defined(__i386__) | ||||
val = rdtsc(); | val = rdtsc(); | ||||
#else | #else | ||||
panic("read_machclk"); | panic("read_machclk"); | ||||
#endif | #endif | ||||
} else { | } else { | ||||
struct timeval tv; | struct timeval tv, boottime; | ||||
microtime(&tv); | microtime(&tv); | ||||
getboottime(&boottime); | |||||
val = (((u_int64_t)(tv.tv_sec - boottime.tv_sec) * 1000000 | val = (((u_int64_t)(tv.tv_sec - boottime.tv_sec) * 1000000 | ||||
+ tv.tv_usec) << MACHCLK_SHIFT); | + tv.tv_usec) << MACHCLK_SHIFT); | ||||
} | } | ||||
return (val); | return (val); | ||||
} | } | ||||
#ifdef ALTQ3_CLFIER_COMPAT | #ifdef ALTQ3_CLFIER_COMPAT | ||||
▲ Show 20 Lines • Show All 935 Lines • Show Last 20 Lines |