MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bintime_shift

Function bintime_shift

freebsd/sys/time.h:107–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107static __inline void
108bintime_shift(struct bintime *_bt, int _exp)
109{
110
111 if (_exp > 0) {
112 _bt->sec <<= _exp;
113 _bt->sec |= _bt->frac >> (64 - _exp);
114 _bt->frac <<= _exp;
115 } else if (_exp < 0) {
116 _bt->frac >>= -_exp;
117 _bt->frac |= (uint64_t)_bt->sec << (64 + _exp);
118 _bt->sec >>= -_exp;
119 }
120}
121
122#define bintime_clear(a) ((a)->sec = (a)->frac = 0)
123#define bintime_isset(a) ((a)->sec || (a)->frac)

Callers 1

tc_adjprecisionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected