Commit 9d944c7f authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

unix: Rename "time" module to "utime" to allow extensibility.

Name choosen per latest conventions and for compatibiity with stmhal port.
parent 9642846d
......@@ -102,7 +102,7 @@ STATIC mp_obj_t mod_time_sleep(mp_obj_t arg) {
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_time_sleep_obj, mod_time_sleep);
STATIC const mp_map_elem_t mp_module_time_globals_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_time) },
{ MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_utime) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_clock), (mp_obj_t)&mod_time_clock_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_sleep), (mp_obj_t)&mod_time_sleep_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_time), (mp_obj_t)&mod_time_time_obj },
......@@ -112,6 +112,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_time_globals, mp_module_time_globals_table
const mp_obj_module_t mp_module_time = {
.base = { &mp_type_module },
.name = MP_QSTR_time,
.name = MP_QSTR_utime,
.globals = (mp_obj_dict_t*)&mp_module_time_globals,
};
......@@ -100,7 +100,7 @@ extern const struct _mp_obj_module_t mp_module_ffi;
#define MICROPY_PY_FFI_DEF
#endif
#if MICROPY_PY_TIME
#define MICROPY_PY_TIME_DEF { MP_OBJ_NEW_QSTR(MP_QSTR_time), (mp_obj_t)&mp_module_time },
#define MICROPY_PY_TIME_DEF { MP_OBJ_NEW_QSTR(MP_QSTR_utime), (mp_obj_t)&mp_module_time },
#else
#define MICROPY_PY_TIME_DEF
#endif
......
......@@ -49,6 +49,7 @@ Q(func)
Q(var)
Q(input)
Q(utime)
Q(time)
Q(clock)
Q(sleep)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment