Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/src/time.c

    r44e8541 r163eccd7  
    206206
    207207/**
    208  * Get clock resolution. Only CLOCK_REALTIME is supported.
     208 * Get clock resolution.
    209209 *
    210210 * @param clock_id Clock ID.
     
    218218        switch (clock_id) {
    219219        case CLOCK_REALTIME:
     220        case CLOCK_MONOTONIC:
    220221                res->tv_sec = 0;
    221222                res->tv_nsec = USEC2NSEC(1); /* Microsecond resolution. */
     
    228229
    229230/**
    230  * Get time. Only CLOCK_REALTIME is supported.
     231 * Get time.
    231232 *
    232233 * @param clock_id ID of the clock to query.
     
    246247                tp->tv_nsec = USEC2NSEC(tv.tv_usec);
    247248                return 0;
     249        case CLOCK_MONOTONIC:
     250                getuptime(tp);
     251                return 0;
    248252        default:
    249253                errno = EINVAL;
     
    267271        switch (clock_id) {
    268272        case CLOCK_REALTIME:
     273        case CLOCK_MONOTONIC:
    269274                // TODO: setting clock
    270275                // FIXME: HelenOS doesn't actually support hardware
Note: See TracChangeset for help on using the changeset viewer.