app/test: conditionalize on timer enabled
[dpdk.git] / app / test / test_timer.c
index 03d3d6e..3945ed8 100644 (file)
@@ -31,6 +31,9 @@
  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "test.h"
+
+#ifdef RTE_LIBRTE_TIMER
 /*
  * Timer
  * =====
 #include <rte_random.h>
 #include <rte_malloc.h>
 
-#include "test.h"
 
 #define TEST_DURATION_S 20 /* in seconds */
 #define NB_TIMER 4
@@ -519,3 +521,13 @@ test_timer(void)
 
        return 0;
 }
+
+#else
+
+int
+test_timer(void)
+{
+       return 0;
+}
+
+#endif