Bean shell timer and listener in Jmeter

Bean Shell timer-

Add a new thread and 2 java rews into it.Then add a bean shell timer and in it type

Integer t = 1200;
print("Users wait/think for time 1.2 ms");
return t;
i.e wait for 1.2 ms before every req is executed.so we basically add a timer or wait before every req by adding a bean shell timer at the same level as that of those reqs.

Bean Shell Listener-Add a new thread and then add a HTML req into it. Then add a bean shell Listener.

In that we add
 print("The latency time is " +sampleResult.getLatency());

The function getLatency is used to find how much a req takes to be executed.