kuroko-lang / kuroko

Dialect of Python with explicit variable declaration and block scoping, with a lightweight and easy-to-embed bytecode compiler and interpreter.
https://kuroko-lang.github.io/
MIT License
427 stars 25 forks source link

Local time? #43

Closed kseistrup closed 8 months ago

kseistrup commented 1 year ago

Kuroko's time module seems to have two methods only — sleep() and time(). Is there a way to get the local time from within kuroko?

klange commented 8 months ago

I was not comfortable adding additional functionality to the time module while it was still part of the core. Now that it has been broken out into a shared object module, it can be extended.

There are a lot of functions to implement to match Python. The following were all there prior to 3.3, and are mostly just wrappers around the platform C library, so they have priority:

Python 3.3 and 3.7 each added other functions for providing access to monotonic clocks, process times, and so on.

kseistrup commented 8 months ago

Sounds good. Personally, I would be fine with even a subset of the list above. I rarely use the monotonic clocks et cetera, so I could easily do without those, even in the long run. But the localtime thing is a sore lack for me.

kseistrup commented 8 months ago

:cartwheeling: