Concept Framework 2.0 documentation Contents | Index

standard.C.time.clock

Name Version Deprecated
clock version 1.0 no

Prototype:
number clock()


Description:
The clock function's era begins (with a value of 0) when the Concept program starts to execute. It returns times measured in 1/CLOCKS_PER_SEC

Example:
import standard.C.time

class Main {
     function Main() {
          var start=clock();
          echo "Something to do ...\n";
          for (var i=0;i<1000000;i++) {
               // NOTHING
          }
          var end=clock();
          echo "Elapsed : " + (end-start) + " clock ticks";
     }
}
 

Results 
Something to do ...
Elapsed : 150 clock ticks
 

Returns:
returns times measured in 1/CLOCKS_PER_SEC

Documented by Simona Gabriela Plesuvu, generation time: Fri Jan 21 18:06:19 2011 GMT(c)2011 RadGs Software