Changeset 8c85f0f in mainline


Ignore:
Timestamp:
2018-08-24T19:02:59Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Children:
378d349
Parents:
f33c989e
Message:

Fix missing include

Location:
uspace/lib/posix
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/include/posix/sys/time.h

    rf33c989e r8c85f0f  
    3434#define POSIX_SYS_TIME_H_
    3535
     36#include "libc/time.h"
     37
    3638#define DST_NONE  0
    3739
  • uspace/lib/posix/src/time.c

    rf33c989e r8c85f0f  
    220220        case CLOCK_REALTIME:
    221221                res->tv_sec = 0;
    222                 res->tv_nsec = 1000; /* Microsecond resolution. */
     222                res->tv_nsec = USEC2NSEC(1); /* Microsecond resolution. */
    223223                return 0;
    224224        default:
     
    245245                gettimeofday(&tv, NULL);
    246246                tp->tv_sec = tv.tv_sec;
    247                 tp->tv_nsec = tv.tv_usec * 1000;
     247                tp->tv_nsec = USEC2NSEC(tv.tv_usec);
    248248                return 0;
    249249        default:
     
    301301                }
    302302                if (rqtp->tv_nsec != 0) {
    303                         fibril_usleep(rqtp->tv_nsec / 1000);
     303                        fibril_usleep(NSEC2USEC(rqtp->tv_nsec));
    304304                }
    305305                return 0;
Note: See TracChangeset for help on using the changeset viewer.