From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932254AbdGSOwJ (ORCPT ); Wed, 19 Jul 2017 10:52:09 -0400 Received: from mail-pf0-f171.google.com ([209.85.192.171]:35891 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932180AbdGSOwF (ORCPT ); Wed, 19 Jul 2017 10:52:05 -0400 Subject: Re: [PATCH v3 1/4] time: rtc-lib: Add rtc_show_time(const char *prefix_msg) To: John Stultz Cc: lkml , "Rafael J. Wysocki" , Len Brown , Pavel Machek , Linux PM list , Alessandro Zummo , Alexandre Belloni , linux-rtc@vger.kernel.org, andy.shevchenko@gmail.com, "Paul E. McKenney" , Mark Salyzyn , Thierry Strudel , Thomas Gleixner , Josh Triplett , Nicolas Pitre , Kees Cook References: <20170718221607.132539-1-salyzyn@android.com> From: Mark Salyzyn Message-ID: <99742846-b47b-4ee5-c971-e26e8a5f935b@android.com> Date: Wed, 19 Jul 2017 07:52:03 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/18/2017 05:00 PM, John Stultz wrote: > On Tue, Jul 18, 2017 at 3:15 PM, Mark Salyzyn wrote: >> Go directly to the rtc for persistent wall clock time and print. > So, first, the above doesn't seem accurate to me. You're using > getnstimeofday64() which doesn't touch the RTC. I admit I got that backwards. I copied and pasted a line, that was supposed to read "We can not go" ... The point was that persistent or RTC clock is _not_ always available, so we have to print suspend times when the timeofday clock is available at the points before suspend, and after suspend is complete. The "Suspended for" message (in ms, we want us at least) albeit helpful, is performed at the bottom, and can only be reported if there is a persistent clock available. On most Android devices, it is not available. I will post update, a better description in the primary patch, dropping the intro, printing in . format. I asked in another thread if it would be OK to preserve the Legacy of RTC time format printing with another CONFIG parameter since we have 5 years of tooling that depends on that format. -- Mark