unix: Rename "time" module to "utime" to allow extensibility.
Name choosen per latest conventions and for compatibiity with stmhal port.
This commit is contained in:
parent
9642846d71
commit
9d944c7fb2
@ -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 MP_DEFINE_CONST_FUN_OBJ_1(mod_time_sleep_obj, mod_time_sleep);
|
||||||
|
|
||||||
STATIC const mp_map_elem_t mp_module_time_globals_table[] = {
|
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_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_sleep), (mp_obj_t)&mod_time_sleep_obj },
|
||||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_time), (mp_obj_t)&mod_time_time_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 = {
|
const mp_obj_module_t mp_module_time = {
|
||||||
.base = { &mp_type_module },
|
.base = { &mp_type_module },
|
||||||
.name = MP_QSTR_time,
|
.name = MP_QSTR_utime,
|
||||||
.globals = (mp_obj_dict_t*)&mp_module_time_globals,
|
.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
|
#define MICROPY_PY_FFI_DEF
|
||||||
#endif
|
#endif
|
||||||
#if MICROPY_PY_TIME
|
#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
|
#else
|
||||||
#define MICROPY_PY_TIME_DEF
|
#define MICROPY_PY_TIME_DEF
|
||||||
#endif
|
#endif
|
||||||
|
@ -49,6 +49,7 @@ Q(func)
|
|||||||
Q(var)
|
Q(var)
|
||||||
|
|
||||||
Q(input)
|
Q(input)
|
||||||
|
Q(utime)
|
||||||
Q(time)
|
Q(time)
|
||||||
Q(clock)
|
Q(clock)
|
||||||
Q(sleep)
|
Q(sleep)
|
||||||
|
Loading…
Reference in New Issue
Block a user