AbsoluteTime question...
AbsoluteTime question...
- Subject: AbsoluteTime question...
- From: "Thomas E. Knowlton, Jr." <email@hidden>
- Date: Fri, 27 Feb 2004 08:44:10 -0700
Apologies if this is not exactly on-topic on this list... hopefully I'm
not the only Mac network programmer that needs to know this stuff...
AbsoluteTime et. al. aren't especially well-documented. Maybe to keep
the casual developer from playing there.
Lots of the examples I see use AbsoluteDeltaToDuration and cast the
result to a float, which I think I don't understand.
The PDF for MP services 2.1 states that AbsoluteTime is a 64-bit
monotonically-increasing value. What do you think of the following
interpretation of that statement:
void On_T_DATA(void) // gets called every time T_DATA is received on
the OT notifier proc.
{
AbsoluteTime arrTime(UpTime());
AbsoluteTime depTime(AddDurationToAbsolute(100, arrTime));
AbsoluteTime now;
// MY QUESTION IS REALLY ALL ABOUT THIS LINE OF CODE:
while (*reinterpret_cast<unsigned long long*>(&(now = UpTime())) <
*reinterpret_cast<unsigned long long*>(&depTime))
{
// do T_DATA processing
// if (mAcptr->Rcv(...) == kOTNoDataErr) break;
// ... potentially lengthy (hundreds of usec) processing of received
data...
}
}
Thanks much,
--
Tommy
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.