problem using bif now().
mark.geib@REDACTED
mark.geib@REDACTED
Thu May 1 16:38:03 CEST 2003
I am writing my first production erlang program and need to measure the
duration of calls hitting a server. I am using the bif now() to get the
mega-seconds, seconds and micro-seconds from a base time reference.
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),
but the following does not have the problem.
{MSec,Sec,MicoSec} = erlang:now(),
Read_time = Sec+(MicoSec/1000000),
However, now about every 12 days the seconds values wraps back to zero.
Is this a bug that should be reported, or is there a problem in my
code.?
I am running erlang R9B-0 on Linux Redhat 7.3.
--
<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/4cbaac8b/attachment.bin>
More information about the erlang-questions
mailing list