![]() |
#1 |
Onyx-maniac
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 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 >; <sad trombone> |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
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 |