From bc6dadb3dbddcb1923c628102aa6342cd356cec0 Mon Sep 17 00:00:00 2001 From: izydorst Date: Fri, 15 Aug 2003 19:24:20 +0000 Subject: [PATCH] added sleep() implementation git-svn-id: svn://svn.cc65.org/cc65/trunk@2324 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/geos/common/Makefile | 2 +- libsrc/geos/common/sleep.c | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 libsrc/geos/common/sleep.c diff --git a/libsrc/geos/common/Makefile b/libsrc/geos/common/Makefile index 575d4e1c1..48dce5cc7 100644 --- a/libsrc/geos/common/Makefile +++ b/libsrc/geos/common/Makefile @@ -10,7 +10,7 @@ %.o: %.s @$(AS) -o $@ $(AFLAGS) $< -C_OBJS = _afailed.o abort.o perror.o +C_OBJS = _afailed.o abort.o perror.o sleep.o S_OBJS = copydata.o memcpy.o memset.o zerobss.o all: $(C_OBJS) $(S_OBJS) diff --git a/libsrc/geos/common/sleep.c b/libsrc/geos/common/sleep.c new file mode 100644 index 000000000..32b9689d0 --- /dev/null +++ b/libsrc/geos/common/sleep.c @@ -0,0 +1,23 @@ +/* + * sleep.c + * + * Maciej 'YTM/Elysium' Witkowiak, 15.08.2003 + * + */ + +#include + +unsigned __fastcall__ sleep (unsigned wait) +{ + char typ; + + if ( (get_tv()) & TV_NTSC ) { + typ = 60; + } else { + typ = 50; + } + + Sleep(wait*typ); + + return 0; +} -- 2.39.5