jack_delay is a small command line JACK app you can use to measure the latency of your sound card. It uses a phase measurements on a set of tones to measure the delay from the output to the input. Accuracy is about 1/1000 of a sample. Definitely read the docs in /usr/doc/jack_delay-$VERSION/README to understand how to use this.