Query Windows clock frequency and use reported max
[fio.git] / os / os.h
diff --git a/os/os.h b/os/os.h
index 827b61e90d745211edb0635a028342ca7da42361..5965d7b806b055bf8f2c679da818516a503eb6db 100644 (file)
--- a/os/os.h
+++ b/os/os.h
@@ -412,4 +412,13 @@ static inline bool os_cpu_has(cpu_features feature)
 # define fio_mkdir(path, mode) mkdir(path, mode)
 #endif
 
+#ifdef _SC_CLK_TCK
+static inline void os_clk_tck(long *clk_tck)
+{
+       *clk_tck = sysconf(_SC_CLK_TCK);
+}
+#else
+extern void os_clk_tck(long *clk_tck);
+#endif
+
 #endif /* FIO_OS_H */