www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/01/27/11:59:46

Via: uk.ac.aston; Wed, 27 Jan 1993 15:27:51 +0000
To: thiebaut AT ensibull DOT imag DOT fr, djgpp AT sun DOT soe DOT clarkson DOT edu
From: John Fletcher <ECM9093 AT pcmail DOT aston DOT ac DOT uk>
Date: 27 Jan 93 15:02:07 GMT
Subject: task library - solution
Reply-To: J DOT P DOT Fletcher AT aston DOT ac DOT uk

I have what I think is a solution to the problem with the TASKS
library from AETSK101.ZIP

The problem is that even after recompilation, the time delay
parameters do not work properly with the example, TEST.

The solution is to change the parameter converting from milliseconds
to clock() values.  This is easily done as a patch to TASK.CC as
follows:
...................PATCH for TASK.CC......................
417a418,422
> #if     defined(__GNUG__)
>     const clock_t  clocksPerMsec = CLOCKS_PER_SEC/1000;
>
>     return (msec*clocksPerMsec);
> #else
420a426
> #endif
..................End of PATCH for TASK.CC................

This works on both DJGPP Verion 1.08 and 1.09.

It may apply to other software which use clock().

John


---------------------------------------------------------------------
Dr John P. Fletcher
Department of Chemical Engineering and Applied Chemistry,
Aston University,         Tel: (44) 21 359 3611 ext 4625
Aston Triangle,         Email(Most systems): J DOT P DOT FLETCHER AT ASTON DOT AC DOT UK
BIRMINGHAM B4 7ET  U.K.   Email(JANET only): J DOT P DOT FLETCHER AT UK DOT ASTON DOT AC
---------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019