Whitebeam Template Reference Documentation

Site Map
 
Home
 
Application Guide
Reference
  Installation
  Configuration
  XML Markup
  JavaScript Classes
  ROM
  Templates
  Environment
  Dev Process
  Tools
  External Links
  Example libraries
Community
Contact Whitebeam
To-Do
Download
Credits
Licence
Whitebeam Users
 
 
 

Whitebeam Template Reference Documentation

System Template

time()

Return time taken to process a page (so far)

Syntax

void = rb.debug.time()

Parameters

The 'time' method takes no parameters

Results

The 'time' method returns no useful information.

Remarks

This method returns the number of microseconds that have elapsed since Whitebeam started processing this page.

This information can be invaluable in profiling an application that is performing badly. A call placed right at the end of a page can tell you how long the entire page has taken to generate. Wrapping critical sections in calls will tell you how long that section has taken.

Example

var startTime = rb.debug.time();
callBigSlowFunction();
var endTime = rb.debug.time();

rb.debug.write("bigSlowFunction() took ",
    (endTime-startTime)," micro-seconds to execute<br>");
Whitebeam release 1.3.36
(loadtime : 61ms)