File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ STATIC mp_obj_t mod_os_stat(mp_obj_t path_in) {
5252
5353 mp_obj_tuple_t * t = mp_obj_new_tuple (10 , NULL );
5454 t -> items [0 ] = MP_OBJ_NEW_SMALL_INT ((machine_int_t )sb .st_mode );
55- t -> items [1 ] = MP_OBJ_NEW_SMALL_INT (sb .st_ino );
55+ t -> items [1 ] = MP_OBJ_NEW_SMALL_INT (( machine_int_t ) sb .st_ino );
5656 t -> items [2 ] = MP_OBJ_NEW_SMALL_INT ((machine_int_t )sb .st_dev );
5757 t -> items [3 ] = MP_OBJ_NEW_SMALL_INT ((machine_int_t )sb .st_nlink );
5858 t -> items [4 ] = MP_OBJ_NEW_SMALL_INT ((machine_int_t )sb .st_uid );
Original file line number Diff line number Diff line change @@ -55,10 +55,8 @@ void msec_sleep_tv(struct timeval *tv) {
5555#define MP_CLOCKS_PER_SEC CLOCKS_PER_SEC
5656#endif
5757
58- #if defined(MP_CLOCKS_PER_SEC ) && (MP_CLOCKS_PER_SEC == 1000000 ) // POSIX
59- #define CLOCK_DIV 1000.0
60- #elif defined(MP_CLOCKS_PER_SEC ) && (MP_CLOCKS_PER_SEC == 1000 ) // WIN32
61- #define CLOCK_DIV 1.0
58+ #if defined(MP_CLOCKS_PER_SEC )
59+ #define CLOCK_DIV (MP_CLOCKS_PER_SEC / 1000.0)
6260#else
6361#error Unsupported clock() implementation
6462#endif
You can’t perform that action at this time.
0 commit comments