From: "Alex Vinokur" Newsgroups: comp.os.msdos.djgpp Subject: Re: how to make a Timer Date: Tue, 11 Feb 2003 06:21:51 +0200 Lines: 135 Message-ID: References: NNTP-Posting-Host: 212.150.34.142 X-Trace: fu-berlin.de 1044937316 44596890 212.150.34.142 (16 [79865]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Eli Zaretskii" wrote in message news:Pine DOT SUN DOT 3 DOT 91 DOT 1030210075002 DOT 7932C AT is... > > On Sun, 9 Feb 2003, Alex Vinokur wrote: > > > > You could use the CVS interface: > > > > > > http://www.delorie.com/djgpp/cvs.html > > > > > > (follow the link to cvsweb interface on that page). > > > > > > I have downloaded DJGPP 2.04 via CVS interface. > > How can I create version 2.04 to work with it ? > > I looked at http://www.delorie.com/bin/cvsweb.cgi/djgpp/. > > However I didn't find what I have to do > > Navigate to the file you want to get and save it to your local disk. In > this case, point your browseer to > > http://www.delorie.com/bin/cvsweb.cgi/djgpp/src/libc/pc_hw/timer/uclock.c > > and the file uclock.c will appear. Then click Files->Save as, save the > file, compile it and use it. (Section 8.22 of the DJGPP FAQ list > explains how to replace a single module in the library, should you need > that.) Thanks. I did that. However problem with uclock resolution not solved. ========================= Windows 2000 DJGPP 2.03 GNU gcc/g++ version 3.2.1 ========================= ========================= libc.a has been updated by uclock.c (version 1.4; 2001) from http://www.delorie.com/bin/cvsweb.cgi/djgpp/src/libc/pc_hw/timer/uclock.c gcc -c -Wall -O2 uclock.c ar rvs libc.a uclock.o ========================= ========= C code : BEGIN ========= /* File utest.c */ #include #include #include int main() { #define TOTAL_TIMES 12500 int i; for (i = 0; i < TOTAL_TIMES; i++) { uclock_t tval = uclock(); printf ("[%d] uclock = %ld\n", i, tval); fflush(stdout); assert (tval >= 0); } return 0; } ========= C code : END =========== ========= Compilation & Run : BEGIN ========= % gcc utest.c % a.exe [0] uclock = 0 [1] uclock = 286 [2] uclock = 355 [3] uclock = 400 [4] uclock = 445 [5] uclock = 487 [6] uclock = 530 [7] uclock = 575 [8] uclock = 618 [9] uclock = 660 [10] uclock = 705 [---omitted---] [1320] uclock = 63883 [1321] uclock = 63926 [1322] uclock = 63969 [1323] uclock = 64012 [1324] uclock = 64055 [1325] uclock = 64097 [1326] uclock = 64139 [1327] uclock = -529 Assertion failed at utest.c line 14: tval >= 0 Exiting due to signal SIGABRT Raised at eip=0000452e eax=005ffecc ebx=00000120 ecx=00000000 edx=00000000 esi=00000054 edi=0000fd60 ebp=005fff78 esp=005ffec8 program=C:\____TM~2\0_uclock\a.exe cs: sel=01f7 base=017e0000 limit=0060ffff ds: sel=01ff base=017e0000 limit=0060ffff es: sel=01ff base=017e0000 limit=0060ffff fs: sel=01cf base=00009df0 limit=0000ffff gs: sel=020f base=00000000 limit=0010ffff ss: sel=01ff base=017e0000 limit=0060ffff App stack: [00600000..00580000] Exceptn stack: [0000fcc0..0000dd80] Call frame traceback EIPs: 0x00004454 0x0000452e 0x000035a9 0x00001672 0x00002ec8 ========= Compilation & Run : END =========== -- ============================== Alex Vinokur mailto:alexvn AT go DOT to http://www.simtel.net/pub/oth/19088.html ==============================