#include <unistd.h>
Go to the source code of this file.
LIBCOM_API void epicsStdCall convertDoubleToWakeTime |
( |
double |
timeout, |
|
|
struct timespec * |
wakeTime |
|
) |
| |
Definition at line 68 of file osdTime.cpp.
75 else if (
timeout > 60 * 60 * 24 * 3652.5)
76 timeout = 60 * 60 * 24 * 3652.5;
78 clock_get_time(host_clock, &now);
80 wait.tv_sec =
static_cast< time_t
>(
timeout);
81 wait.tv_nsec =
static_cast< long >((
timeout - (double)wait.tv_sec) * 1e9);
83 wakeTime->
tv_sec = now.tv_sec + wait.tv_sec;
84 wakeTime->
tv_nsec = now.tv_nsec + wait.tv_nsec;
85 if (wakeTime->
tv_nsec >= 1000000000L) {
86 wakeTime->
tv_nsec -= 1000000000L;
Defined by POSIX Real Time.