Re: Filling in a struct timespec with the current date?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=afxtLkvwu9NksFIUNdpWhWAqElo7OBFH5M/28DkUNN4=; b=TkuCMnd9QvRnMQT7L9iBZkLaAX8kcplh9dO0Z2vroggaw5HKeGqCwCkniYA5/iY25L NAHh+3JESjOhxU1ydfpeJ0d4e2nycjRQd9fJOFaMaOl/rDnmX13R+0q+bAxaNAEa8DPg 6CeSbetD7kIsjpGopDCmzYL+f2NX7D6gyLIIM= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=VzrEYzN13k9Zbces+fvaPe1WlW+yRc56uSTPb4GDTySD1d5KTv6rlbgJ1rO7MDRgGQ p70hwhIFdLw6/Z735ndM2G8B5ZBS3pPRp+h9yL+T6fynUHyA+28M5vCWC7hrm/QUo/Js aDj36ThEE/4mPyA4IqfAio+q7h+Fs4F7swUdA= // Calculate the duration. elapsed = end - start; // Convert to nanoseconds. // Have to do some pointer fun because AbsoluteToNanoseconds // works in terms of UnsignedWide, which is a structure rather // than a proper 64-bit integer. elapsedNano = AbsoluteToNanoseconds( *(AbsoluteTime *) &elapsed ); return * (uint64_t *) &elapsedNano; 10−9 seconds and 10−8 seconds (1 ns and 10 ns) _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Esteban Bodigami