Lines Matching defs:ts
8 * Copyright 1995, 1996, 1997, 1998, 1999 by Theodore Ts'o
386 struct timespec ts;
387 ts.tv_sec = tv2.tv_sec - tv1.tv_sec;
388 ts.tv_nsec = (tv2.tv_usec - tv1.tv_usec) * MILISEC;
389 if (ts.tv_nsec < 0) {
390 ts.tv_nsec += NANOSEC;
391 ts.tv_sec -= 1;
394 ts.tv_sec = ts.tv_sec * d_flag / 100;
395 ts.tv_nsec = ts.tv_nsec * d_flag / 100;
396 if (ts.tv_nsec > NANOSEC) {
397 ts.tv_sec += ts.tv_nsec / NANOSEC;
398 ts.tv_nsec %= NANOSEC;
400 if (ts.tv_sec || ts.tv_nsec)
401 nanosleep(&ts, NULL);