mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-31 14:39:55 +01:00
Fix integer overflow error when calculating throughput.
This commit is contained in:
parent
77f5344ff7
commit
d7e59d6188
@ -118,7 +118,7 @@ int main (int argc, char *argv [])
|
||||
|
||||
throughput = (unsigned long)
|
||||
((double) message_count / (double) elapsed * 1000000);
|
||||
megabits = (double) (throughput * message_size * 8) / 1000000;
|
||||
megabits = ((double) throughput * message_size * 8) / 1000000;
|
||||
|
||||
printf ("message size: %d [B]\n", (int) message_size);
|
||||
printf ("message count: %d\n", (int) message_count);
|
||||
|
Loading…
x
Reference in New Issue
Block a user