problem using bif now().

Raimo Niskanen raimo.niskanen@REDACTED
Mon May 5 08:26:15 CEST 2003

Give us some more code (to see if something else has gone wrong), and 
some more figures, like how often the calculation is done, how fast the 
machine gets swamped (or rather what 'top' reports after how long time)...

/ Raimo Niskanen, Erlang/OTP, Ericsson AB

mark.geib@REDACTED wrote:
> Chris,
> It's a typo, sorry.
> I would not be so concerned if the cpu usage was constant, but it just
> keeps increasing until the machine is swamped.
> I did try floating point, no diffenence.
> Mark.
> On Thu, 2003-05-01 at 12:28, Chris Pressey wrote:
>>On 01 May 2003 09:05:20 -0600
>>mark.geib@REDACTED wrote:
>>>>>The problem is this. The following code fragment causes the CPU
>>>>>useage to continually increase, eventually consuming all the CPU
>>>>>on the machine.
>>>>>{MSec,Sec,MicoSec} = erlang:now(),
>>>>>Read_time = (Msec*1000000)+Sec+(MicoSec/1000000),
>>No idea, sorry.  But out of curiousity:
>>- MSec and Msec are different variables (I assume that's a typo)
>>- what happens if you use floating point (MSec*1.0e+6) ?
>>I use bigints fairly extensively and I've never noticed it hogging CPU,
>>but then again, I've never really looked for it specifically...

More information about the erlang-questions mailing list