How are these two leaky bucket algorithms related?

enter image description here

enter image description here

I am studying about leaky bucket algorithm but I am unable to relate these 2 algorithms