From patchwork Fri Aug 28 11:55:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 9414 X-Patchwork-Delegate: kieran.bingham@ideasonboard.com Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id A04C5BF019 for ; Fri, 28 Aug 2020 11:55:13 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1B8FA628F3; Fri, 28 Aug 2020 13:55:13 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="KB+xAIWu"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D43F16037B for ; Fri, 28 Aug 2020 13:55:11 +0200 (CEST) Received: from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3F1F3303; Fri, 28 Aug 2020 13:55:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1598615711; bh=7wtbWgL4Aqx2zdw/LjYFNNweoMk12HcaDb94DiqnurQ=; h=From:To:Cc:Subject:Date:From; b=KB+xAIWucFNEgVe46YOe0YLkwLdk9S/maiYpLwc+7F2Puva47A7XNGP1CU4KyI8Mk lUWU4IEtEsXTCb/OoDpFw7hWePB7d/hkb+EllQ0LSMjFE7CUIPqF5zWE75/FcQorWF 19LmRbSelSV2mSSnqMF3Rkn3Wd2VYaXWgxK0ZB7M= From: Kieran Bingham To: libcamera devel Date: Fri, 28 Aug 2020 12:55:07 +0100 Message-Id: <20200828115507.305323-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: buffer: Improve timestamp documentation X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The Buffer timestamp documentation is short and does not explain that the timestamp is based on a monotonic time source, as opposed to the real/wall-time clocks available in the system. Expand upon the statements to detail that it can not be used directly as a wall-clock for the captured date/time without a further reference point, and that by taking a reference point - the user will be bringing in potential inconsistencies which must be considered. Signed-off-by: Kieran Bingham Reviewed-by: Umang Jain --- src/libcamera/buffer.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/libcamera/buffer.cpp b/src/libcamera/buffer.cpp index a094737d0392..c08ca4234b29 100644 --- a/src/libcamera/buffer.cpp +++ b/src/libcamera/buffer.cpp @@ -92,7 +92,13 @@ LOG_DEFINE_CATEGORY(Buffer) * The timestamp is expressed as a number of nanoseconds relative to the system * clock since an unspecified time point. * - * \todo Be more precise on what timestamps refer to. + * This timestamp is monotonic and not affected by changes in system time, + * however it is still susceptible to small adjustments made by NTP. + * + * This clock has no specification on its time base, so can not be directly be + * converted to a 'real' wall clock time without a comparable reference point. + * However, continued conversions from the reference point, may bring in + * inaccuracies due to changes on the real time clock which must be considered. */ /**