View Single Post
Re: need your advice on clock()
Old
  (#17)
botmeister
Ex-Council Member
 
botmeister's Avatar
 
Status: Offline
Posts: 1,090
Join Date: Nov 2003
Location: Canada
Default Re: need your advice on clock() - 19-10-2004

During my port of mEAn to linux g++ 3.x I discovered that clock() under linux works differently than under windows and returns the processor time (in ticks) used by the calling process. Under windows, clock() instead returns the time (in ticks) that has elapsed since the calling process was invoked.

So, under linux, clock() will tell you how much cpu time the process has used, but under windows clock() will tell you how much time has gone by since the process was first executed. These are two very different numbers, and under linux the use of clock is no good for replacing pfnTime( ).


Maker of the (mEAn) Bot.Admin Manager

"In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. van de Snepscheut
  
Reply With Quote