X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcutil%2Fsilctimer.h;h=30debf07d67a93f1995d583ea3123838eee3965e;hb=e7b6c157b80152bf9fb9266e6bdd93f9fb0db776;hp=845b46a72b0d9dc0939193595b59af5445ef455f;hpb=ab2995608e4061f88231bdba3f1f5f2709503701;p=silc.git diff --git a/lib/silcutil/silctimer.h b/lib/silcutil/silctimer.h index 845b46a7..30debf07 100644 --- a/lib/silcutil/silctimer.h +++ b/lib/silcutil/silctimer.h @@ -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 ...