Changes in uspace/lib/posix/src/time.c [44e8541:163eccd7] in mainline
- File:
-
- 1 edited
-
uspace/lib/posix/src/time.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/src/time.c
r44e8541 r163eccd7 206 206 207 207 /** 208 * Get clock resolution. Only CLOCK_REALTIME is supported.208 * Get clock resolution. 209 209 * 210 210 * @param clock_id Clock ID. … … 218 218 switch (clock_id) { 219 219 case CLOCK_REALTIME: 220 case CLOCK_MONOTONIC: 220 221 res->tv_sec = 0; 221 222 res->tv_nsec = USEC2NSEC(1); /* Microsecond resolution. */ … … 228 229 229 230 /** 230 * Get time. Only CLOCK_REALTIME is supported.231 * Get time. 231 232 * 232 233 * @param clock_id ID of the clock to query. … … 246 247 tp->tv_nsec = USEC2NSEC(tv.tv_usec); 247 248 return 0; 249 case CLOCK_MONOTONIC: 250 getuptime(tp); 251 return 0; 248 252 default: 249 253 errno = EINVAL; … … 267 271 switch (clock_id) { 268 272 case CLOCK_REALTIME: 273 case CLOCK_MONOTONIC: 269 274 // TODO: setting clock 270 275 // FIXME: HelenOS doesn't actually support hardware
Note:
See TracChangeset
for help on using the changeset viewer.
