diff options
author | Damien George <damien.p.george@gmail.com> | 2014-03-08 15:24:39 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-03-08 15:24:39 +0000 |
commit | 0c36da0b59bd3d5aeb6f7bd7f75913695a1dd366 (patch) | |
tree | eb1d8e50037139646f935df99da56764fcafb4f1 /unix/time.c | |
parent | 8fd7d7e102372a3fe067030aa0f2049f744b1567 (diff) |
Implement ROMable modules. Add math module.
mp_module_obj_t can now be put in ROM.
Configuration of float type is now similar to longint: can now choose
none, float or double as the implementation.
math module has basic math functions. For STM port, these are not yet
implemented (they are just stub functions).
Diffstat (limited to 'unix/time.c')
-rw-r--r-- | unix/time.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unix/time.c b/unix/time.c index 6dba9f0d0..1abd7cff3 100644 --- a/unix/time.c +++ b/unix/time.c @@ -28,7 +28,7 @@ static MP_DEFINE_CONST_FUN_OBJ_0(mod_time_clock_obj, mod_time_clock); static mp_obj_t mod_time_sleep(mp_obj_t arg) { #if MICROPY_ENABLE_FLOAT struct timeval tv; - machine_float_t val = mp_obj_get_float(arg); + mp_float_t val = mp_obj_get_float(arg); double ipart; tv.tv_usec = round(modf(val, &ipart) * 1000000); tv.tv_sec = ipart; |