
On Wed, 24 Jun 2015 13:59:08 +0300 Paul Sokolovsky <pmiscml@gmail.com> wrote:
Hello,
On Wed, 24 Jun 2015 12:40:10 +0200 Antoine Pitrou <solipsis@pitrou.net> wrote:
On Wed, 24 Jun 2015 13:13:49 +0300 Paul Sokolovsky <pmiscml@gmail.com> wrote:
So, the question is not how to "appropriate for precise datetime computations" - MicroPython inherits that ability by being a Python, but how to scale into the opposite direction, how to integrate into stdlib "realtime" time handling, which is simple, fast (getting timing value itself is low-overhead) and modular-arithmetic by its nature.
I'm sorry, I don't understand. If you have 64-bit ints then why would you use anything smaller for timestamps?
Because MicroPython stays close (== may stay close) to hardware and does not depend on any OS (even those smaller embedded OSes, which are called RTOS'es). Then, it's usual case for embedded hardware to have hardware timers of the same size or smaller as the architecture machine word. For example, on a 32-bit CPU, timers are usually 32-, 24-, or 16- bit. On 16-bit CPUs, timers are 16- or 8-bit.
I don't think such timers have a place in the CPython standard library, though. Don't you have an additional namespace for micropython-specific features? Regards Antoine.