Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Onyx Boox

Notices

Reply
 
Thread Tools Search this Thread
Old 05-10-2022, 04:01 PM   #1
Renate
Onyx-maniac
Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.
 
Posts: 3,924
Karma: 17500001
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5, Go6
A timely post about time for time-wasters

What is time? Ok, I don't mean to get so heavy on you. Time is the progressive progress of time over time. Err, that's not very satisfactory either.

Ok, let's limit the domain. What is time to an Android? Since time immemorial (approximately 1984) computers have had little clocks in them that can still keep track of time even when the main computer parts are powered off. Since then, for compatibility, continuity and a sense of nostalgia, many devices still pretend that they have the venerable MC146818 Real-Time Clock integrated circuit inside them. (See https://www.nxp.com/docs/en/data-sheet/MC146818.pdf .)

So this integrated circuit (and its paradigm) is about as sophisticated as that digital watch you had in 1984. It can count seconds, it knows about calendars. So, I can check my 21st century Poke3 by:
Code:
# cd /sys/class/rtc/rtc0
# cat date
1970-11-20
# cat time
00:45:05
# cat since_epoch
27909922
So, yeah, we're going to party like it's 1970???

In Android world we simply let the clock run from Zero, that is January 1st, 1970. We don't worry about the details. Whenever you disconnect the battery it goes back to 1970-01-01. Then how do we actually know what time it is? Ah, we can save the offset (52 years or so) in special little files like /data/vendor/time/ats_1

Well, that's all fine and dandy, but what happens if we're in a system (like recovery) that hasn't mounted /data? Then you're retro. Well, can't we set the stupid clock to the real time? That would be nice. The first problem is that the DTB prevents you from writing to the RTC.
Code:
008df0 qcom,qpnp-rtc-write = < 0x0 >;
Well, heck, I can fix that. Oh, but it's totally broken and when you use "hwclock -w" or the ioctl RTC_SET_TIME it crashes.

<sad trombone>
Renate is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unutterably Silly Online time wasters ... ummm ... games cromag Lounge 2 10-08-2016 09:52 AM
"date" reports correct time zone and time; UI reports a time several hours off Synthead Kindle Developer's Corner 17 01-05-2015 05:10 AM


All times are GMT -4. The time now is 02:11 PM.


MobileRead.com is a privately owned, operated and funded community.