From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id E86D25A004E for ; Thu, 25 Jul 2024 09:52:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721893933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PhU8pbqZV8nZ36c06YRIPprYPKZGbUN/7NWHnc7EAaY=; b=UtgHVch8dc52ebJZ8sUWK2czq72H7lNX6yBNxusTsjIBUgMUJVwYOu5su1xypCBYH39p7K 6/1zjShbsYI3yWJcczyzbdbF4TPyTtu3JyIZBcENiuVqT1Sj95R2EGX7g4Y3H/X7sUhlrJ Vg+CTs27xNfTDuDsJR0pnPTiVCgMDao= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-358-4ONJLdWnPCulUrTOrYdawQ-1; Thu, 25 Jul 2024 03:52:09 -0400 X-MC-Unique: 4ONJLdWnPCulUrTOrYdawQ-1 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-6b79409b763so8203176d6.3 for ; Thu, 25 Jul 2024 00:52:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721893929; x=1722498729; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=PhU8pbqZV8nZ36c06YRIPprYPKZGbUN/7NWHnc7EAaY=; b=bj8qTVuwlKl91BbPFc3rVHiBZwFkfq5hRr6/zDWChPjJVXU/MKhNV0V+FjbOL9shVf w+P2efBSCaO9zVKtkdyOiOj1R+coeZXsICJz4Zn0An/dMgD+eI+Gd8LIgMlUNNeHzyhx PA3pmktq4fD8mc+TX4w7QSvc4nCXsGmeDj0GBg3WdF+UIYWIGnEKeTR+acsSofkqQPl1 Eb4Nav9lfsaJrhDT4cnp+1/wTLFdZqh0sPfuikO9UtNeRNARF6joRtV+G0HIzizJzfjx dTu/utOro0dU+gjFVZlmKHXg42XWWWkcYvQX8oHl0HWu2BITof9wqg0ipwpgyxR2J4Fa W6bQ== X-Gm-Message-State: AOJu0YzUWI7QQJKVBRhLyhVmEQA8qvFhyzvb4GL2jL3y2RQ5r/zp/X7q UplfSk4+Og1j6f2jqQu/ra+gI0cYVDco/4Z4SN81AczWkIQulJhRyZS/ZAu20d0WO3K/VP2Iy7C IlZVvRyPaRNfKIFo+aIxR8BPsZEPEyjGtY6OXaTSsE93L5QWT2g== X-Received: by 2002:a05:6214:2248:b0:6b5:83bb:11b5 with SMTP id 6a1803df08f44-6bb406c9884mr14232256d6.9.1721893928832; Thu, 25 Jul 2024 00:52:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGjIpZN55MhHW/Q3AVuap0jJ9DSlQNWWTfdVVsbqIg5NmHeeQecVbUf4dQEruPUnXPM2OBn7g== X-Received: by 2002:a05:6214:2248:b0:6b5:83bb:11b5 with SMTP id 6a1803df08f44-6bb406c9884mr14232136d6.9.1721893928530; Thu, 25 Jul 2024 00:52:08 -0700 (PDT) Received: from maya.cloud.tilaa.com (maya.cloud.tilaa.com. [164.138.29.33]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6bb3fae79d9sm4504436d6.125.2024.07.25.00.52.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jul 2024 00:52:08 -0700 (PDT) Date: Thu, 25 Jul 2024 09:51:33 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 05/11] log: Initialise timestamp for relative log time also if we use a log file Message-ID: <20240725095125.76ace601@elisabeth> In-Reply-To: References: <20240724215021.3366863-1-sbrivio@redhat.com> <20240724215021.3366863-6-sbrivio@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: XINWDU6WLHFXRD7ALEERL7H64Q7BVLJE X-Message-ID-Hash: XINWDU6WLHFXRD7ALEERL7H64Q7BVLJE X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu, 25 Jul 2024 13:35:25 +1000 David Gibson wrote: > On Wed, Jul 24, 2024 at 11:50:11PM +0200, Stefano Brivio wrote: > > ...not just for debug messages. Otherwise, timestamps in the log file > > are consistent but the starting point is not zero. > > > > Do this right away as we enter main(), so that the resulting > > timestamps are as closely as possible relative to when we start. > > > > Signed-off-by: Stefano Brivio > > Reviewed-by: David Gibson > > It does occur to me, though... when we're using relative timestamps, > should we be using the monotonic clock instead of the realtime clock? Right, yes, I was under the impression that we could risk mixing those with packet capture timestamps (where we want the realtime clock), but actually it's never the case. I'll post another patch for that. -- Stefano