tv.nsecs = (int)val; return true; } static bool set_rel_time(char *optarg_str_p) { char *frac, *end; long val; size_t frac_digits; if (!optarg_str_p) return true; /* skip leading whitespace */ while (*optarg_str_p == ' ' || *optarg_str_p == '\t...
return-pthread_cond_wait(&mCond, &mutex.mMutex); } inline status_tCondition::waitRelative(Mutex& mutex, nsecs_t reltime) { #if defined(HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE) structtimespec ts; ts.tv_sec = reltime/1000000000; ts.tv_nsec = reltime%1000000000; return-pthread_cond_timedwait...
nsecs = 100; spi = m->spi; tmp = 0; cs_change = 1; status = 0; list_for_each_entry (t, &m->transfers, transfer_list) { /* override speed or wordsize? */ if (t->speed_hz || t->bits_per_word) do_setup = 1; /* init (-1) or override (1) transfer params */ if ...
ND_PRINT(" %u nanoseconds", nsecs); *len -= 4; bp += 4; } static void ptp_print_timestamp_identity(netdissect_options *ndo, const u_char *bp, u_int *len, const char *ttype) { uint64_t secs; uint32_t nsecs; uint16_t port_id; uint64_t port_identity; ...
nsecs = 100; spi = m->spi; tmp = 0; cs_change = 1; status = 0; list_for_each_entry (t, &m->transfers, transfer_list) { /* override speed or wordsize? */ if (t->speed_hz || t->bits_per_word) do_setup = 1;
now():表示当前时间的time_pointto_time_t():将time_point转换成time_t秒from_time_t():将time_t转换成time_point 源码如下: structsystem_clock{// wraps GetSystemTimePreciseAsFileTime/GetSystemTimeAsFileTimeusingrep=longlong;usingperiod=ratio_multiply<ratio<_XTIME_NSECS_PER_TICK,1>,nano>;...
nsecs, u64, flags) { struct bpf_hrtimer *t; int ret = 0; enum hrtimer_mode mode; if (in_nmi()) return -EOPNOTSUPP; if (flags & ~(BPF_F_TIMER_ABS | BPF_F_TIMER_CPU_PIN)) return -EINVAL; __bpf_spin_lock_irqsave(&timer->lock); t = timer->timer; if (!t || !...
__time_t st_ctime; /* Time of last status change. */ unsigned long int st_ctimensec; /* Nsecs of last status change. */ #endif #ifndef __USE_FILE_OFFSET64 unsigned long int __unused4; unsigned long int __unused5; #else
(tstamp) { s32 timeout = READ_ONCE(ct->timeout) - nfct_time_stamp; tstamp->stop = ktime_get_real_ns(); if (timeout < 0) tstamp->stop -= jiffies_to_nsecs(-timeout); } if (nf_conntrack_event_report(IPCT_DESTROY, ct, portid, report) < 0) { /* destroy event wa...
void SurfaceFlinger::handleTransaction(uint32_t transactionFlags) { ATRACE_CALL(); State drawingState(mDrawingState); Mutex::Autolock _l(mStateLock); const nsecs_t now = systemTime(); mDebugInTransaction = now; transactionFlags = getTransactionFlags(eTransactionMask);//产生一个新的transaction...