File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,10 +122,10 @@ STATIC mp_obj_t time_mktime(mp_obj_t tuple) {
122122MP_DEFINE_CONST_FUN_OBJ_1 (time_mktime_obj , time_mktime );
123123
124124
125- /// \function sleep(milliseconds )
126- /// Sleep for the given number of milliseconds .
127- STATIC mp_obj_t time_sleep (mp_obj_t milliseconds_o ) {
128- HAL_Delay (mp_obj_get_int (milliseconds_o ) );
125+ /// \function sleep(seconds )
126+ /// Sleep for the given number of seconds .
127+ STATIC mp_obj_t time_sleep (mp_obj_t seconds_o ) {
128+ HAL_Delay (mp_obj_get_int (seconds_o ) * 1000 );
129129 return mp_const_none ;
130130}
131131MP_DEFINE_CONST_FUN_OBJ_1 (time_sleep_obj , time_sleep );
Original file line number Diff line number Diff line change @@ -38,18 +38,12 @@ Functions
3838 Sleep for the given number of seconds. Seconds can be a floating-point number to
3939 sleep for a fractional number of seconds.
4040
41- .. only :: port_esp8266
41+ .. only :: port_esp8266 or port_wipy
4242
4343 .. function :: sleep(seconds)
4444
4545 Sleep for the given number of seconds.
4646
47- .. only :: port_wipy
48-
49- .. function :: sleep(milliseconds)
50-
51- Sleep for the given number of milliseconds.
52-
5347.. function :: time()
5448
5549 Returns the number of seconds, as an integer, since 1/1/2000.
You can’t perform that action at this time.
0 commit comments