/shark/trunk/ports/first/modules/grubstar.c |
---|
767,10 → 767,16 |
int GRUBSTAR_get_remain_capacity(LEVEL l, int budget) |
{ |
struct timespec actual,ty; |
TIME tx; |
GRUBSTAR_level_des *lev = (GRUBSTAR_level_des *)(level_table[l]); |
kern_gettime(&actual); |
SUBTIMESPEC(&actual, &lev->cap_lasttime, &ty); |
tx = TIMESPEC2USEC(&ty); |
return lev->b[budget].avail; |
// the remain capacity is from the first dispatch so is less then |
// actual capacity |
return (lev->b[budget].avail-tx); |
} |