From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.comp.lib.gnulib.bugs,gmane.emacs.devel Subject: Re: boot time on Linux Date: Thu, 10 Aug 2023 10:14:27 +0800 Message-ID: <875y5nve2k.fsf@yahoo.com> References: <87tttmpt5h.fsf@turtle.gmx.de> <5962135.d8TiXCRyrx@nimes> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23048"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Paul Eggert , Robert Pluim , bug-gnulib@gnu.org, =?utf-8?Q?P=C3=A1draig?= Brady , Sven Joachim , 64937@debbugs.gnu.org, Natanael Copa , Emacs-devel@gnu.org, Thorsten Kukuk To: Bruno Haible Original-X-From: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane-mx.org@gnu.org Thu Aug 10 04:14:50 2023 Return-path: Envelope-to: gnu-bug-gnulib@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qTvCM-0005mT-1N for gnu-bug-gnulib@m.gmane-mx.org; Thu, 10 Aug 2023 04:14:50 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qTvCE-0004Gs-SO; Wed, 09 Aug 2023 22:14:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qTvCD-0004GY-B7 for bug-gnulib@gnu.org; Wed, 09 Aug 2023 22:14:41 -0400 Original-Received: from sonic303-20.consmr.mail.ne1.yahoo.com ([66.163.188.146]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qTvCB-0000K7-O1 for bug-gnulib@gnu.org; Wed, 09 Aug 2023 22:14:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1691633677; bh=fSlZlaw8+1jFYEsZLKhexQQDAng/m6xxxenUqhEDcGE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=HuTynhozq/tNlPR72HlGWZxhiIhfcHYhNfEttfZhK52/XsmoJ7fcD28/PyLqbDCIXKo/OOhgGMVein4QTeO7ZyImv7Rkj8f44M4g0tiKYLNe5x4VKQ4RXPO/fHhh8JVyA5jgdPJ5drMp8SzvNys0cR4fXNeVP7C9/tJxJMCMgy4RJu57QLloK4UJYaTuamSBPpWBpiO30HIE92NLggDACEt1cRMbp49ijPE+uiZIMt5pdDXeGsu95ddIdrpDjSflPuy/16wheBxC7utM5nwF+7tq+z6p+bQM4wRYMDnydPKgTQV5PiMdnyztmT6iappySpRpASm+BpB2GtpM22qI7w== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1691633677; bh=oEtTtSp6CbRui2MYTauj5wWkr9K676UW3LGuJFs8JRU=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=aNJP0DXumf+S2rdOMZUCG6RJIUe+pkzate2SX7PRPQPvzjTY38K3LWT/4OLKqLbzJzxILbC+AaenXhF1kKfFaG6cRJoU6+kLDcyydvfWIFWWIvbE9DwSQADFo1XtAXmdRXCjUhZCCxCWw3232jFOiOSgwBp2XyxqqTQ5DVXtOCAyoaVHMFQUkLWWdQtAgulNwyXTzZt+lA+Y+W2OcyUuvkcK2q7XtRzbmGZvKnKeomfSRA8feOGKfxtA98z0rKS3iU5R+jApdW7ScVq7HYQC77VMafq3zXDeu4LypL1fcAkdcpZP7XR8BYqTtc7ZV01BKNvA27ErLSC6yXpX4cr0FQ== X-YMail-OSG: px4w.uoVM1ldWxR.qXD5NRETR6oeFEZKJKlSzf4rx7wWWOmgMBY3_5yWSCkAQgX L8dfMK5qbmYzlkXEOWyEXueW89X8DyIFQeDwrJfis.hWCq34e1OpaBe0TdcyqZ378rbWcXAnIk.l UqbihOMF029yVn5HHfwXe1KnnPXs3UdBFcVZ_CiXs33_37D6eOpMpXqPRlvcBSSvonOYf41zRcWj HII9USjSr5qREjDKb_0ECtdcmi0mwbuXvDy0miPty2WAvaoyV.CIl9KQZfCdzk7rLn7jVw_e3wia iyOW98aBAj0JUMKQrW7zy6u_bauUOtAbTriWjWlPrzO4iWNA4c73knx48nfV4alqLuRy7jS5D8eA KX_J0fn3aLi0w5lCPXtDBwmYFUl8OCLn9Uj7SttnahC5CrlJr7FQjU3khy1s3GJ.J7a0BnhSBk3W 7V0h6ertAOsYy3vveBXmzdWWWR3rx2d2.Ajlmv0oEKcx7Kp7DgjX4hdDqVfqwxDwERPPsrGfBrLz lrb18lmTt8caXBxCrB1GhCaZMIPkM52.04IOSI6AcC2hDs7r9.CfNPfGNaqoz.uh1l5mwkiH6yz0 8YtoTkvLTHbE5gNOxm0zQBnvio4sLAbukr1GDOR0z2jIVDb4RvN7ifx.PHENE2pv7Zmm5NcFtyJx rQ9JFCr_mcgkgfJhVyR5zEVewEB.ncw.g6U.FLU1K7wk7cDHP_0cKzd3cTzG.QtcJ1zZQxkTOEDX unWwnqt6xESwkSPrNDIMdJ8a_bImIVOyuKsEHVak_QwGkH7XBEFPaUZlX7qWYH._S_iO6IggKBh6 0dADRb3ZKxDJsCfmgyJlej_bmNNEaOFywIJQNN_Jbn X-Sonic-MF: X-Sonic-ID: 0c5a8db1-f5bc-4651-9c57-d3c7e5db066b Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ne1.yahoo.com with HTTP; Thu, 10 Aug 2023 02:14:37 +0000 Original-Received: by hermes--production-sg3-69654d8bd-752gm (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID f8fbf1c91ceb01381aa0f237ee6368d6; Thu, 10 Aug 2023 02:14:33 +0000 (UTC) In-Reply-To: <5962135.d8TiXCRyrx@nimes> (Bruno Haible's message of "Thu, 10 Aug 2023 02:14:20 +0200") X-Mailer: WebService/1.1.21695 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.188.146; envelope-from=luangruo@yahoo.com; helo=sonic303-20.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane-mx.org@gnu.org Original-Sender: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.comp.lib.gnulib.bugs:48135 gmane.emacs.devel:308501 Archived-At: Bruno Haible writes: > Po Lu wrote: >> > Also, I don't know how Android records boot time so I'll cc this to Po >> > Lu, the main developer for Emacs on Android. >> >> The boot time is off limits to user programs on Android, for security >> reasons. > > No, it isn't. The attached file, when compiled and run under Termux (which > doesn't have particular permissions), prints e.g.: > > from clock : 1691616762.476870660 = 2023-08-09 21:32:42.476870660 > from sysinfo: 1691616762.329261637 = 2023-08-09 21:32:42.329261637 > > Note that this uses the kernel's uptime counter, so it will not work well > when the user changes the current time manually. But this is rare on Android. This uses the uptime counter (which also results in an SELinux denial for me, but different Android distributions have SELinux policies of varying strictness), which cannot establish the precise time the system started, since time elapses between the read from the uptime counter and the read from the RTC.