Closed
Bug 67246
Opened 24 years ago
Closed 24 years ago
Hook libxpnet into linux installer
Categories
(SeaMonkey :: Installer, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9
People
(Reporter: samir_bugzilla, Assigned: samir_bugzilla)
References
Details
(Whiteboard: [xpiprd] Fix in hand)
Attachments
(2 files)
No description provided.
| Assignee | ||
Updated•24 years ago
|
| Assignee | ||
Updated•24 years ago
|
Priority: -- → P3
Updated•24 years ago
|
QA Contact: gemal → gbush
| Assignee | ||
Comment 2•24 years ago
|
||
| Assignee | ||
Comment 3•24 years ago
|
||
| Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Whiteboard: [xpiprd] → [xpiprd] Fix in hand
Comment 5•24 years ago
|
||
you're probably doing a whole lot more floating point math than you need to here:
+ diff_usecs = (aPost->tv_sec - aPre->tv_sec) * USECS_PER_SEC;
+ diff_usecs += (float)aPost->tv_usec - (float)aPre->tv_usec;
+ rate = ((float)(aBytes/KILOBYTE))/((float)(diff_usecs/USECS_PER_SEC));
if you think about it, you've got two integer constants in this last
calculation. Simplified, this is:
(aBytes/KILOBYTE) * (USECS_PER_SEC/diff_usecs)
which is actually the same as
(aBytes * USECS_PER_SEC) / (KILOBYTE * diff_usecs)
which is actually the same as
(aBytes/diff_usecs) / (USECS_PER_SEC / KILOBYTE)
and if you think about it that way, the compiler can do the work of
USECS_PER_SEC/KILOBYTE at compile time
this could actually gain you some accuracy as well because your'e not dividing
or multiplying by very large numbers.. I love numerical math.
so if you switch to that, sr=alecf
| Assignee | ||
Comment 6•24 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Updated•21 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•