bb_timer_stop

Time.

Description

bb_timer_stop( (int) $display = 0, (int) $precision = 3 ); 

Parameters (2)

0. $display — Optional. (int)
The display.
1. $precision — Optional. (int) => 3
The precision.

Usage

  1. if ( !function_exists( 'bb_timer_stop' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-core.php'; 
  3.  
  4. // The display. 
  5. $display = -1; 
  6.  
  7. // The precision. 
  8. $precision = 3; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bb_timer_stop($display, $precision); 
  12.  

Defined (1)

The function is defined in the following location(s).

/bp-forums/bbpress/bb-includes/functions.bb-core.php  
  1. function bb_timer_stop($display = 0, $precision = 3) { //if called like bb_timer_stop(1), will echo $timetotal 
  2. global $bb_timestart, $timeend; 
  3. $mtime = explode(' ', microtime()); 
  4. $timeend = $mtime[1] + $mtime[0]; 
  5. $timetotal = $timeend - $bb_timestart; 
  6. if ($display) 
  7. echo bb_number_format_i18n($timetotal, $precision); 
  8. return bb_number_format_i18n($timetotal, $precision);