Skip to content

Commit

Permalink
DUBBO-514 改为浮点计算
Browse files Browse the repository at this point in the history
  • Loading branch information
liangfei0201 committed Aug 31, 2012
1 parent f2e74a9 commit 1b7bbae
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected int getWeight(Invoker<?> invoker, Invocation invocation) {
int uptime = (int) (System.currentTimeMillis() - timestamp);
int warmup = invoker.getUrl().getParameter(Constants.WARMUP_KEY, Constants.DEFAULT_WARMUP);
if (uptime > 0 && uptime < warmup) {
weight = uptime / (warmup / weight);
weight = (int) ( (float) uptime / ( (float) warmup / (float) weight ) );
}
}
return weight;
Expand Down

0 comments on commit 1b7bbae

Please sign in to comment.