Logo Search packages:      
Sourcecode: csound version File versions  Download package

PUBLIC void csoundSleep ( size_t  milliseconds )

Waits for at least the specified number of milliseconds, yielding the CPU to other threads.

Definition at line 152 of file threads.c.

References csoundSleep().

Referenced by csoundSleep().

    struct timespec ts;
    register size_t n, s;

    s = milliseconds / (size_t) 1000;
    n = milliseconds - (s * (size_t) 1000);
    n = (size_t) ((int) n * 1000000);
    ts.tv_sec = (time_t) s;
    ts.tv_nsec = (long) n;
    while (nanosleep(&ts, &ts) != 0)

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index