From nobody Tue Jul 12 19:57:54 2022 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 40B3517FBCB0 for ; Tue, 12 Jul 2022 19:58:08 +0000 (UTC) (envelope-from 4250.82.1d4e50001e217f7.d78ef173e69e10c8770dae7ebafaa0cf@email-od.com) Received: from s1-b0c6.socketlabs.email-od.com (s1-b0c6.socketlabs.email-od.com [142.0.176.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4LjBPq352rz42bb for ; Tue, 12 Jul 2022 19:58:07 +0000 (UTC) (envelope-from 4250.82.1d4e50001e217f7.d78ef173e69e10c8770dae7ebafaa0cf@email-od.com) DKIM-Signature: v=1; a=rsa-sha256; d=email-od.com;i=@email-od.com;s=dkim; c=relaxed/relaxed; q=dns/txt; t=1657655887; x=1660247887; h=content-transfer-encoding:content-type:mime-version:references:in-reply-to:message-id:subject:cc:to:from:date:x-thread-info:subject:to:from:cc:reply-to; bh=aJjL7Ug16kHgaCo2SaEMBit98QiXpLqr9eR7dreYrw4=; b=vJJSdRWVgYeRRgxVgqGzQl7chIVqvbl5E/LEOF0OLfQxlc59467lCq4T2wbj55VCFbIX6GMDwZJegwnx2i4AMpSwEVjDvJ00dLY2Vo3UmQM3d2YnKx+pM10qWfhEJA7HdPAIKCB5xCITRMJfBwiJW1E/czqzpVWeW/Ld/cxIvCg= X-Thread-Info: NDI1MC4xMi4xZDRlNTAwMDFlMjE3ZjcucXVlc3Rpb25zPWZyZWVic2Qub3Jn Received: from r3.us-east-1.aws.in.socketlabs.com (r3.us-east-1.aws.in.socketlabs.com [142.0.191.3]) by mxsg2.email-od.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Tue, 12 Jul 2022 15:57:55 -0400 Received: from smtp.lan.sohara.org (EMTPY [185.202.17.215]) by r3.us-east-1.aws.in.socketlabs.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Tue, 12 Jul 2022 15:57:55 -0400 Received: from [192.168.63.1] (helo=steve.lan.sohara.org) by smtp.lan.sohara.org with smtp (Exim 4.94.2 (FreeBSD)) (envelope-from ) id 1oBM14-0000o4-43; Tue, 12 Jul 2022 20:57:54 +0100 Date: Tue, 12 Jul 2022 20:57:54 +0100 From: Steve O'Hara-Smith To: questions@freebsd.org Cc: "John Levine" Subject: Re: How do get elapsed time in milliseconds in a shell script? Message-Id: <20220712205754.928c3f921f42f66fb977f891@sohara.org> In-Reply-To: <20220712194432.AA49E458B955@ary.qy> References: <20220712194432.AA49E458B955@ary.qy> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.0) X-Clacks-Overhead: "GNU Terry Pratchett" List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4LjBPq352rz42bb X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=email-od.com header.s=dkim header.b=vJJSdRWV; dmarc=none; spf=pass (mx1.freebsd.org: domain of 4250.82.1d4e50001e217f7.d78ef173e69e10c8770dae7ebafaa0cf@email-od.com designates 142.0.176.198 as permitted sender) smtp.mailfrom=4250.82.1d4e50001e217f7.d78ef173e69e10c8770dae7ebafaa0cf@email-od.com X-Spamd-Result: default: False [-1.70 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[steve@sohara.org,4250.82.1d4e50001e217f7.d78ef173e69e10c8770dae7ebafaa0cf@email-od.com]; R_DKIM_ALLOW(-0.20)[email-od.com:s=dkim]; R_SPF_ALLOW(-0.20)[+ip4:142.0.176.0/20]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[questions]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:7381, ipnet:142.0.176.0/22, country:US]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[steve@sohara.org,4250.82.1d4e50001e217f7.d78ef173e69e10c8770dae7ebafaa0cf@email-od.com]; RCVD_IN_DNSWL_NONE(0.00)[142.0.191.3:received]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[email-od.com:+]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; DMARC_NA(0.00)[sohara.org]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[email-od.com:dkim] X-ThisMailContainsUnwantedMimeParts: N On 12 Jul 2022 15:44:32 -0400 "John Levine" wrote: > It's not built into /bin/sh, but if you run /usr/bin/time it prints > the time to 1/100 sec which might be good enough. How do you get it to do that, all it does AFAICT is time the execution of some command in real, system and user time. It does nothing with the time of day. -- Steve O'Hara-Smith