From: lfm AT pgroup DOT com (Larry Meadows) Subject: Timers and less (fwd) 16 Aug 1997 10:39:59 -0700 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <199708151628.JAA17798.cygnus.gnu-win32@pacific.pgroup.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Original-To: gnu-win32 AT cygnus DOT com Original-Cc: koi AT ssa DOT crane DOT navy DOT mil X-Mailer: ELM [version 2.4ME+ PL25 (25)] Original-Sender: owner-gnu-win32 AT cygnus DOT com The following code works well if you are using a pentium, ppro, or pII; it is an interface to the on-chip cycle counter: .file "timer86a.s" .text .align 16 .globl _iclock _iclock: .byte 0x0f, 0x31 ret In C, declare iclock as a long long int, it returns a 64-bit integer that has resolution equal to the clock rate of the chip. The return value is in %eax, %edx (low, high) which matches the C calling convention. If you want time as a double you just divide the return value by the clock frequency: extern long long iclock() time = iclock() / 200.0e6; I guess you can use inline assembler in gcc, I haven't tried. ----- Forwarded message from Mark Koi ----- From gnu-win32-owner AT cygnus DOT com Fri Aug 15 05:22:20 1997 Message-ID: Date: Thu, 14 Aug 1997 14:06:29 -0500 (EST) From: Mark Koi To: gnu-win32 AT cygnus DOT com Subject: Timers and less Sender: owner-gnu-win32 AT cygnus DOT com Precedence: bulk I just installed the binaries. I was using DJGPP before with ALLEGRO for timers. Those allegro library calls don't work, and can't seem to compile allegro with gnu-win32. DOES SOMEBODY HAVE A SIMPLE TIMER PROGRAM? NEED RESOLUTION OF 100ms, not a big request but a little lost. Also, can somebody mail me a uuencoded copy of less.exe for gnu-win32. Or is it just as easy to get source and compile. koi AT ssa DOT crane DOT navy DOT mil - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help". ----- End of forwarded message from Mark Koi ----- - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".