I don’t know of a posterize function, but you could use Math.floor().
Assuming that the lineart of your B uses time as first parameter, you could define B like this:
myFrameRate = 3;
t = framesToTime(Math.floor(timeToFrames(time)/myFrameRate)*myFrameRate);
B = linear(t, 5, 6, 0, 100);
First I turn time to frames, so I can work with myFrameRate. Then I divide it by the myFrameRate value to create the steps. Then I multimplicate it by the same value to not alter the actual value of time. Then I make it time again, via framesToTime(), so I can use it in the linear function.
If B is dependent on another value, not time, you could do something similar by using valueAtTime.
There may be some simpler solution, but I can’t think of one.