Added SILC Thread Queue API
[silc.git] / lib / silcutil / silctimer.h
index 845b46a72b0d9dc0939193595b59af5445ef455f..30debf07d67a93f1995d583ea3123838eee3965e 100644 (file)
@@ -185,7 +185,7 @@ SilcBool silc_timer_is_running(SilcTimer timer);
  *    silc_timer_synchronize(&timer);
  *    start = silc_timer_tick(&timer, FALSE);
  *    do_something();
- *    stop = silc_tiemr_tick(&timer, TRUE);
+ *    stop = silc_timer_tick(&timer, TRUE);
  *
  ***/
 
@@ -193,19 +193,19 @@ static inline
 SilcUInt64 silc_timer_tick(SilcTimer timer, SilcBool adjust)
 {
 #if defined(__GNUC__) || defined(__ICC)
-#ifdef SILC_I486
+#if defined(SILC_I486)
   SilcUInt64 x;
   asm volatile ("rdtsc" : "=A" (x));
   return adjust ? x - timer->sync_tdiff : x;
 
-#elif SILC_X86_64
+#elif defined(SILC_X86_64)
   SilcUInt64 x;
   SilcUInt32 hi, lo;
   asm volatile ("rdtsc" : "=a" (lo), "=d" (hi));
   x = ((SilcUInt64)lo | ((SilcUInt64)hi << 32));
   return adjust ? x - timer->sync_tdiff : x;
 
-#elif SILC_POWERPC
+#elif defined(SILC_POWERPC)
   SilcUInt32 hi, lo, tmp;
   asm volatile ("0:            \n\t"
                 "mftbu   %0    \n\t"
@@ -236,11 +236,11 @@ SilcUInt64 silc_timer_tick(SilcTimer timer, SilcBool adjust)
  *
  *    Synchronizes the `timer'.  This call will attempt to synchronize the
  *    timer for more accurate results with high resolution timing.  Call
- *    this before you start using time `timer'.
+ *    this before you start using the `timer'.
  *
  * EXAMPLE
  *
- *    // Synchronized timer
+ *    // Synchronize timer
  *    silc_timer_synchronize(&timer);
  *    silc_timer_start(&timer);
  *    ... time passes ...