2 #include <BeOSBuildCompatibility.h>
15 mode_t __gUmask
= 022;
19 debugger(const char *message
)
21 fprintf(stderr
, "debugger() called: %s\n", message
);
27 _debuggerAssert(const char *file
, int line
, const char *expression
)
30 snprintf(buffer
, sizeof(buffer
), "%s:%d: %s\n", file
, line
, expression
);
40 gettimeofday(&tm
, NULL
);
41 return (int64
)tm
.tv_sec
* 1000000LL + (int64
)tm
.tv_usec
;
46 snooze(bigtime_t amount
)
51 int64 secs
= amount
/ 1000000LL;
52 int64 usecs
= amount
% 1000000LL;
54 if (sleep((unsigned)secs
) < 0)
59 if (usleep((useconds_t
)usecs
) < 0)
68 snooze_until(bigtime_t time
, int timeBase
)
70 return snooze(time
- system_time());