[linux] clock()

behan samsoft na bigfoot.com
Pátek Říjen 1 13:28:54 CEST 1999


Niekto menom Dado Jan napísal:
> Tak, pre istotu som tu vyskusal, a tento programik:
> 
> #include <stdio.h>
> #include <time.h>
> 
> int main(int argc, char **argv)
> {
>   clock_t a;
>   int i;
> 
>   a=clock();
>   printf("1:%d\n",a);
>   for(i=0;i<0x000fffff;i++){};
>   printf("2:%d\n",clock()-a);
>   for(i=0;i<0x00ffffff;i++){};
>   printf("3:%d\n",clock()-a);  
>   return(0);
> };
> 
> Mi rozhodne daval korektny vystup...
> 
> Jano

Lenze ja to este delim constantou CLOCKS_PER_SEC, podla manualu
a stale hadze 4.neviemco
-- 

    " They said I need Windows 95 or better, so I've installed Linux "

  |------------------------------------------|
    Samuel Behan
    student 1. rocnika                 
    Fakulty riadenia a informatiky ZU Zilina
    clen SKLUGu ( http://www.sklug.sk )           
    Email: samsoft na bigfoot.com          
  |------------------------------------------|



Další informace o konferenci linux