|
From: <v-...@ou...> - 2002-05-13 20:25:54
|
Hi Ioannis, > For portable code use the functions provided in time.h . There is much > useful stuff in there. Good idea....if I could understand how to use it. The original function has been given to us by our teacher as a help...it's for three weeks now that I am in contact with C++. This routine should return a time (no matter which, but in seconds would be great), so I can measure the time passed from start to end of the task given to the user. Is there a portable solution or does the original function only work with gcc greater than 2.95.3 (perhaps gcc 3.x)? In the code I use MyTime as follows: ----------------------------8< schnipp------------------------------ start=3DMyTime(); [task] end=3DMyTime(); complete=3D(end - start) + (10 * penaltycounter); ----------------------------schnapp >8------------------------------ You understand what I want? ;) Chau V-Li |