OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [uClibc/] [libc/] [unistd/] [usleep.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1325 phoenix
#include <time.h>
2
#include <sys/time.h>
3
#include <sys/types.h>
4
#include <unistd.h>
5
 
6
int usleep (__useconds_t usec)
7
{
8
    const struct timespec ts = {
9
        .tv_sec = (long int) (usec / 1000000),
10
        .tv_nsec = (long int) (usec % 1000000) * 1000ul
11
    };
12
    return(nanosleep(&ts, NULL));
13
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.