BRL-CAD
snooze.h File Reference
#include "common.h"
#include "bu/defines.h"
Include dependency graph for snooze.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BU_SEC2USEC(sec)   (1000000LL * (sec))
 

Functions

int bu_snooze (int64_t useconds)
 

Detailed Description

Routines for suspending the current thread of execution.

Definition in file snooze.h.

Macro Definition Documentation

◆ BU_SEC2USEC

#define BU_SEC2USEC (   sec)    (1000000LL * (sec))

Convert seconds to microseconds

Definition at line 38 of file snooze.h.

Function Documentation

◆ bu_snooze()

int bu_snooze ( int64_t  useconds)

suspend the current thread for at least the specified number of microseconds.

this is a portability replacement for usleep(3).

returns 0 on success, non-zero on error