From 96e8198d83a295cef108f45bd874b3948dce2daf Mon Sep 17 00:00:00 2001 From: tchernobog Date: Mon, 31 Jul 2006 21:56:46 +0000 Subject: [PATCH] - Fix SJF to use the new exported interface. Maybe we could add a convenience function "get_remaining_time()" for the user commodity. git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@803 3ecf2c5c-341e-0410-92b4-d18e462d057c --- plugins/pyloader/src/builtin-policies/sjf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/pyloader/src/builtin-policies/sjf.py b/plugins/pyloader/src/builtin-policies/sjf.py index a6500a3..0b460d5 100644 --- a/plugins/pyloader/src/builtin-policies/sjf.py +++ b/plugins/pyloader/src/builtin-policies/sjf.py @@ -43,6 +43,6 @@ class sjf(Policy) : def sort_queue(self, queue): cmpf = lambda a, b: \ - a.get_remaining_time() < \ - b.get_remaining_time() + a.get_total_cpu_time() - a.get_elapsed_time() < \ + b.get_total_cpu_time() - b.get_elapsed_time() self.sort(queue,cmpf)