I want to know the pulse that has been generated by the encoder
You want to know that a pulse was generated, or when the pulse was generated, or how long the pulse was? Or, all of the above?
What do you want to do when a pulse arrives?
One does not calculate a pulse. The encoder generates a pulse. It is necessary to detect that a pulse has occurred, and to do something with that simple fact.
What you want to do with that fact has a lot to do with how you detect that pulse, and with what else your Arduino is doing.
You need to provide a lot more details.