add timer to get duration
remove lock and unlock for single producing thread and consuming thread
add timer for getting duration when running program