Skip to content

Commit

Permalink
feat: Add emulated sleep_ms function.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjw committed Nov 30, 2023
1 parent 685fe28 commit 2b23191
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions i75/emulated/machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import time

import mp_time

time.sleep_ms = mp_time.sleep_ms
5 changes: 5 additions & 0 deletions i75/emulated/time.py → i75/emulated/mp_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import time

def sleep_ms(delay: int) -> None:
time.sleep(delay / 1000.0)

0 comments on commit 2b23191

Please sign in to comment.