Home | History | Annotate | Download | only in time

Lines Matching defs:ts_

30     ts_.tv_sec = seconds;
31 ts_.tv_nsec = nanoseconds;
40 ts_ = in.GetTS();
46 truncated_ns_ = ts_.tv_nsec;
51 ts_(in), scale_(scale), truncated_(false) { }
55 rval.ts_.tv_sec = ts_.tv_sec * factor;
61 int64_t tv_nsec = static_cast<int64_t>(ts_.tv_nsec) * factor;
62 rval.ts_.tv_sec += (tv_nsec / kNanosecondsPerSecond);
63 rval.ts_.tv_nsec = tv_nsec % kNanosecondsPerSecond;
68 struct timespec ret = ts_;
69 ret.tv_nsec = (ts_.tv_nsec + other.ts_.tv_nsec) % 1000000000;
70 ret.tv_sec = (ts_.tv_sec + other.ts_.tv_sec) +
71 (ts_.tv_nsec + other.ts_.tv_nsec) / 1000000000;
76 struct timespec ret = ts_;
79 ret.tv_nsec = (1000000000 + ts_.tv_nsec - other.ts_.tv_nsec) % 1000000000;
80 ret.tv_sec = (ts_.tv_sec - other.ts_.tv_sec) -
81 (ts_.tv_nsec < other.ts_.tv_nsec ? 1 : 0);
86 return ts_.tv_sec < other.ts_.tv_sec ||
87 (ts_.tv_sec == other.ts_.tv_sec && ts_.tv_nsec < other.ts_.tv_nsec);
91 return ts_.tv_sec * (kNanosecondsPerSecond / scale_) + ts_.tv_nsec / scale_;
95 return ts_.tv_sec;
100 truncated_ns_ = (ts_.tv_nsec / scale_) * scale_;
108 struct timespec rval = { ts_.tv_sec, subseconds_in_ns()};
113 struct timespec ts_;
140 ts_.tv_sec = 0;
141 ts_.tv_nsec = 0;
145 ts_ = ts;
149 return TimeDifference(ts_, 1);
154 rval.tv_sec = ts_.tv_sec - other.ts_.tv_sec;
155 rval.tv_nsec = ts_.tv_nsec - other.ts_.tv_nsec;
165 rval.ts_.tv_sec += other.seconds();
166 rval.ts_.tv_nsec += other.subseconds_in_ns();
167 if (rval.ts_.tv_nsec >= kNanosecondsPerSecond) {
168 ++rval.ts_.tv_sec;
169 rval.ts_.tv_nsec -= kNanosecondsPerSecond;
175 return (ts_.tv_sec == other.ts_.tv_sec) &&
176 (ts_.tv_nsec == other.ts_.tv_nsec);
184 return ((ts_.tv_sec - other.ts_.tv_sec) < 0) ||
185 ((ts_.tv_sec == other.ts_.tv_sec) &&
186 (ts_.tv_nsec < other.ts_.tv_nsec));
202 ts_.tv_sec += other.seconds();
203 ts_.tv_nsec += other.subseconds_in_ns();
204 if (ts_.tv_nsec >= kNanosecondsPerSecond) {
205 ++ts_.tv_sec;
206 ts_.tv_nsec -= kNanosecondsPerSecond;
212 ts_.tv_sec -= other.seconds();
213 ts_.tv_nsec -= other.subseconds_in_ns();
214 if (ts_.tv_nsec < 0) {
215 --ts_.tv_sec;
216 ts_.tv_nsec += kNanosecondsPerSecond;
222 *dest = ts_;
226 struct timespec ts_;