Concept Framework 2.2 documentation Contents | Index

standard.C.time.difftime

Name Version Deprecated
difftime version 1.0 no

Prototype:
number difftime(number timer1, number timer0)

Parameters:
timer1      [in] Ending time
timer2      [in] Start time

Description:
difftime returns the elapsed time in seconds, from timer0 to timer1. The value returned is a double-precision, floating-point number.

Example:
import standard.C.time

class Main {
     function Main() {
          var start=time();
          echo "Something to do ...\n";
          for (var i=0;i<20000000;i++) {
               // NOTHING
          }
          var end=time();
          echo "Elapsed : " + difftime(end,start) + " seconds";
     }
}
 

Results 
Something to do ...
Elapsed : 2 seconds
 

Returns:
the elapsed time in seconds, from timer0 to timer1.

Documented by Simona Gabriela Plesuvu, generation time: Sun Jan 27 18:15:15 2013 GMT(c)2013 Devronium Applications