This paper presents a novel efficient wormhole detection mechanism for wireless sensor networks that uses round trip time (RTT) measurements to identify wormhole attacks, which degrade network performance. The proposed method allows nodes to transmit an unlimited number of messages without a threshold problem, overcoming limitations of existing schemes. Experimental results indicate that the new method achieves high network performance and enhances message source privacy.