Trying to make mutex work and timing