Lines Matching defs:nsec

91 	int usec, nsec;
100 * Fast algorithm to convert nsec to usec -- see hrt2ts()
103 nsec = ts.tv_nsec;
104 usec = nsec + (nsec >> 2);
105 usec = nsec + (usec >> 1);
106 usec = nsec + (usec >> 2);
107 usec = nsec + (usec >> 4);
108 usec = nsec - (usec >> 3);
109 usec = nsec + (usec >> 2);
110 usec = nsec + (usec >> 3);
111 usec = nsec + (usec >> 4);
112 usec = nsec + (usec >> 1);
113 usec = nsec + (usec >> 6);
899 int nsec;
908 nsec = tv->tv_nsec - now.tv_nsec + nsec_per_tick - 1;
910 if (nsec < 0) {
912 nsec += NANOSEC;
913 } else if (nsec >= NANOSEC) {
915 nsec -= NANOSEC;
918 ticks = NSEC_TO_TICK(nsec);
945 int64_t nsec;
948 nsec = tv->tv_nsec + nsec_per_tick - 1;
950 if (nsec < 0) {
952 nsec += NANOSEC;
953 } else if (nsec >= NANOSEC) {
955 nsec -= NANOSEC;
958 ticks = NSEC_TO_TICK(nsec);
982 * tsp->nsec = hrt % NANOSEC;
1151 * Finally, we compute nsec = hrt - (sec * 1,000,000,000). nsec will always
1154 * Thus, nsec < 3 * 1,000,000,000 + 2^30, which is less than 2^32, so we can
1155 * safely assume that nsec fits in 32 bits. Consequently, when we compute
1159 * Since nsec < 3 * 1,000,000,000 + 2^30 == 4,073,741,824, the cleanup loop:
1161 * while (nsec >= NANOSEC) {
1162 * nsec -= NANOSEC;
1175 uint32_t sec, nsec, tmp;
1189 nsec = (uint32_t)hrt - (tmp << 9);
1190 while (nsec >= NANOSEC) {
1191 nsec -= NANOSEC;
1195 tsp->tv_nsec = nsec;
1249 uint32_t sec, nsec, tmp;
1264 nsec = (uint32_t)hrt - (tmp << 9);
1265 while (nsec >= NANOSEC) {
1266 nsec -= NANOSEC;
1275 t = (nsec >> 7) + (nsec >> 8) + (nsec >> 12);
1276 q = (nsec >> 1) + t + (nsec >> 15) + (t >> 11) + (t >> 14);
1278 r = nsec - q*1000;