timer: prefer TSC to HPET
[dpdk.git] / examples / timer / main.c
index 7ecfad1..3bee864 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  * 
- *   Copyright(c) 2010-2012 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
  *   All rights reserved.
  * 
  *   Redistribution and use in source and binary forms, with or without 
@@ -30,7 +30,6 @@
  *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  * 
- *  version: DPDK.L.1.2.3-3
  */
 
 #include <stdio.h>
@@ -85,7 +84,7 @@ timer1_cb(__attribute__((unused)) struct rte_timer *tim,
        printf("%s() on lcore %u\n", __func__, lcore_id);
 
        /* reload it on another lcore */
-       hz = rte_get_hpet_hz();
+       hz = rte_get_timer_hz();
        lcore_id = rte_get_next_lcore(lcore_id, 0, 1);
        rte_timer_reset(tim, hz/3, SINGLE, lcore_id, timer1_cb, NULL);
 }
@@ -136,7 +135,7 @@ MAIN(int argc, char **argv)
        rte_timer_init(&timer1);
 
        /* load timer0, every second, on master lcore, reloaded automatically */
-       hz = rte_get_hpet_hz();
+       hz = rte_get_timer_hz();
        lcore_id = rte_lcore_id();
        rte_timer_reset(&timer0, hz, PERIODICAL, lcore_id, timer0_cb, NULL);