From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: question about getkey() , time() and how to pick a char from the screen Date: 1 Aug 2001 08:55:09 GMT Organization: Aachen University of Technology (RWTH) Lines: 20 Message-ID: <9k8g5d$te$1@nets3.rz.RWTH-Aachen.DE> References: <01c11959$9c6f2d00$108784d5 AT feta> <9k5va9$r56$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <01c11a24$ba127080$108784d5 AT feta> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 996656109 942 137.226.32.75 (1 Aug 2001 08:55:09 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 1 Aug 2001 08:55:09 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Gwen wrote: > yes difftime() is what I needed, but it's in second too. But it's a floating point result. So an implementation could return a difftime() result of 0.035 seconds, if it wants to. Of course, most won't, but the standard allows for it nevertheless. > Doing arithmetic with the clock_t type is certainly not very elegant, but > it works in my case ( there isn't a function like diffclock() ). You don't need a special diffclock() function because unlike time_t, clock_t has its values made interpretable by the CLOCKS_PER_SEC constant. I.e. you can easily implement your own diffclock(), if you want one, but you could never implement difftime() portably, given the amount of information the standards allows you to access about time_t. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.