GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum > PHP Code Library
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 18-Jan-2003, 18:11
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough

[function] Timer


PHP Code:

<?php

// NAME: get_timer()
// VERSION: n/a
// AUTHOR: J de Silva
// DESCRIPTION: returns the the timer value at the instance
// this function is called. for more details and uses please see:
// notes below
// 
// TYPE: function
// --------------------

function get_timer()
{
  $t = explode( ' ', microtime() );
  $t = $t[1] + $t[0];
  return $t;
}

// --------------------
// USE:
//
// <?php
// $start = get_timer();
// ... other php code ...
// $end = get_timer();
// printf( "<p>Script took %.4f seconds to run.</p>", ($end - $start));
// ? >

?>


please also see: A simple PHP SCRIPT TIMER / BENCHMARK class.
 
 

Recent GIDBlogFirst week of IA training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[function] Converting Bytes JdS PHP Code Library 4 11-Jan-2007 05:12
[function] Show limited words of a string / text JdS PHP Code Library 0 05-Jun-2003 09:25
[class] Timer JdS PHP Code Library 2 29-Apr-2003 12:20
[Function] Int to Money Conversion Elmseeker PHP Code Library 1 30-Jan-2003 23:10
[function] BBCodes Collection JdS PHP Code Library 1 26-Jan-2003 09:48

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 07:24.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.