Article View: comp.std.c
Article #3366Re: Loop until press return
From: Lawrence Kirby
Date: Sun, 13 Aug 1995 15:54
Date: Sun, 13 Aug 1995 15:54
29 lines
1792 bytes
1792 bytes
In article <kk_WbVS00WB38LdOpV@andrew.cmu.edu>
sm8t+@andrew.cmu.edu "Saleem Mukhtar" writes:
>Hi,
>
>Thanks to all those folks who replied but its not yet working -- I am
>using *Unix* and not a PC so kbhit does not work.
This is a very good example of why you should never post a system specific
question to comp.lang.c. Of course you may not always know beforehand
whether a question is system specific (it is usually obvious but not always).
This question however is covered by the FAQ.
>Also are there any time elapsed routines for C.
time() allows you to measure 'real' time to second resolution, clock()
allows you to measure CPU time to sub-second resolution. Beyond that you,
again, need to resort to system specific calls. This is also covered in
the FAQ. Since you are using Unix such questions should be addresses to
comp.unix.programmer. The FAQ mentions a few system specific routines
but fails to mention a possibly relevant POSIX one - times(). This
is of course still system-dependent so if you want to ask further about it
comp.unix.programmer is the place to go.
--
-----------------------------------------
Lawrence Kirby | fred@genesis.demon.co.uk
Wilts, England | 70734.126@compuserve.com
-----------------------------------------
Technical Details
Message-ID:
<808329288snz@genesis.demon.co.uk>Path:
arc1-ca.pugleaf.net!genesis.demon.co.uk!fredReferences:
<jbundyDCw7uo.9sz@netcom.com> <danpop.807723059@rscernix> <kk_WbVS00WB38LdOpV@andrew.cmu.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!genesis.demon.co.uk!fred From: Lawrence Kirby <fred@genesis.demon.co.uk> Newsgroups: comp.std.c,comp.lang.c Subject: Re: Loop until press return Date: Sun, 13 Aug 95 15:54:48 GMT Organization: none Message-ID: <808329288snz@genesis.demon.co.uk> References: <jbundyDCw7uo.9sz@netcom.com> <danpop.807723059@rscernix> <kk_WbVS00WB38LdOpV@andrew.cmu.edu> Reply-To: fred@genesis.demon.co.uk X-NNTP-Posting-Host: genesis.demon.co.uk X-Newsreader: Demon Internet Simple News v1.27