- 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
This commit is contained in:
tchernobog 2006-07-31 21:56:46 +00:00
parent 58b35916c6
commit 96e8198d83
1 changed files with 2 additions and 2 deletions

View File

@ -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)