timing_test: Add pthread_create
diff --git a/timing_test.cc b/timing_test.cc
index 2f35f26..0468dac 100644
--- a/timing_test.cc
+++ b/timing_test.cc
@@ -11,6 +11,7 @@
 #include <inttypes.h>
 #include <atomic>
 #include <signal.h>
+#include <pthread.h>
 #include <err.h>
 
 typedef int (*vgettime_t)(clockid_t, timespec *);
@@ -46,6 +47,11 @@
 {
 }
 
+static void *empty_thread_proc(void *)
+{
+	return NULL;
+}
+
 int main(int argc, char **argv)
 {
 	if (argc < 3) {
@@ -277,6 +283,14 @@
 		for (size_t i = 0; i < loops; ++i)
 			syscall(SYS_arch_prctl, 42, 0);
 #endif
+	} else if (!strcmp(mode, "pthread_create")) {
+		pthread_t thread;
+		for (size_t i = 0; i < loops; ++i) {
+			if (pthread_create(&thread, NULL,
+					   empty_thread_proc, NULL))
+				err(1, "pthread_create");
+			pthread_join(thread, NULL);
+		}
 	} else {
 		printf("Unknown mode %s\n", mode);
 		return 1;