problem using bif now().

mark.geib@REDACTED mark.geib@REDACTED
Thu May 1 21:06:54 CEST 2003


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...
> 
> -Chris
-- 
  <mark.geib@REDACTED>
Cheyenne Software Engineering
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20030501/2f74a45a/attachment.bin>


More information about the erlang-questions mailing list