View Single Post
Old 01-23-2020, 01:47 PM   #11
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
You can also implement rtcwake in pure-Python, as it's basically timestamp, localtime/utc & ioctls shenanigans.

(To that end, I also ship https://github.com/vpelletier/python-ioctl-opt, although I've never used it myself).

@Frenzie did it for Kobo in KOReader. (https://github.com/koreader/koreader...er/ffi/rtc.lua && https://github.com/koreader/koreader.../wakeupmgr.lua).
Fair warning: the utc vs. localtime crap is a bitch to get right. If you can afford it, the way rtcwake does it (basically switching the whole thread's TZ) is probably less gnarly.

Someone may have already done that for Python, actually, haven't looked .

Last edited by NiLuJe; 01-23-2020 at 01:51 PM.
NiLuJe is offline   Reply With Quote