Is there a way I can add code to time for how long the rfid tag is within read range of the reader?
I would say not. This is not a normal function of a reader, it could be done but is hardly ever implemented. I once had a customer request to do this, and I did it but it requires custom software inside the reader. As I was at a company that designed and made readers this was not so hard. But in my experance this is not normally what is wanted.