On Thursday, March 28, 2002, at 12:06 PM, Conrad G T Yoder wrote:
> Ok, so I looked at the other threads, and I think I may have found the
> real culprit: clock_get_time is returning 0x10000003 and errno is set
> to 2. is clock_get_time implemented? What do these return values mean?
clock_get_time() is a Mach call, so errno isn't relevant:
/usr/include/mach/message.h:#define MACH_SEND_INVALID_DEST
0x10000003
What port did you pass to clock_get_time()?
matt.
p.s. Here's an example of usage:
#include <mach/mach.h>
#include <mach/clock.h>
#include <mach/mach_error.h>
#include <stdio.h>
int main(void) {
kern_return_t ret;
clock_serv_t aClock;
mach_timespec_t aTime;
ret = host_get_clock_service(mach_host_self(), CALENDAR_CLOCK,
&aClock);
if (ret != KERN_SUCCESS) {
fprintf(stderr, "host_get_clock_service() failed: %s\n",
mach_error_string(ret));
abort();
}
ret = clock_get_time(aClock, &aTime);
if (ret != KERN_SUCCESS) {
fprintf(stderr, "clock_get_time() failed: %s\n",
mach_error_string(ret));
abort();
}
printf("aTime = { %u, %u }\n", aTime.tv_sec, aTime.tv_nsec);
return 0;
}
_______________________________________________
unix-porting mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/unix-porting
Do not post admin requests to the list. They will be ignored.