Le 25 nov. 2010 à 13:08, Joel Reymont a écrit :
> I need to capture packets in a circular buffer and timestamp them.
> I also need to print my buffer when certain conditions are met, e.g. on error.
> What is the most convenient way to capture a timestamp for later printing as a hh:mm:ss:xxx?
> Can I convert mach_absolute_time() into a time format?
> Thanks, Joel
CFAbsoluteTimeGetCurrent() or if CoreFoundation is not available, gettimeofday().
You can then use a CFDateFormatterRef or strftime() to create your string.
mach_absolute_time() represents an Up Time, not a wall time.
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden