plugins/include/profiler.inc
author Borja Ferrer <faluco@alliedmods.net>
Sat Aug 04 00:09:10 2007 +0000 (2007-08-04)
changeset 1262 843e9ed0ff29
parent 914 cd241af51653
child 1330 ab94316bb52b
permissions -rw-r--r--
fixed amb728, precache slap sounds
     1 /**
     2  * vim: set ts=4 :
     3  * ===============================================================
     4  * SourceMod (C)2004-2007 AlliedModders LLC.  All rights reserved.
     5  * ===============================================================
     6  *
     7  *  This file is part of the SourceMod/SourcePawn SDK.  This file may only be used 
     8  * or modified under the Terms and Conditions of its License Agreement, which is found 
     9  * in LICENSE.txt.  The Terms and Conditions for making SourceMod extensions/plugins 
    10  * may change at any time.  To view the latest information, see:
    11  *   http://www.sourcemod.net/license.php
    12  *
    13  * Version: $Id$
    14  */
    15 
    16 #if defined _profiler_included
    17  #endinput
    18 #endif
    19 #define _profiler_included
    20 
    21 /**
    22  * ONLY AVAILABLE ON WINDOWS RIGHT NOW K.
    23  */
    24  
    25 /**
    26  * Creates a new profile object.  The Handle must be freed
    27  * using CloseHandle().
    28  *
    29  * @return			Handle to the profiler object.
    30  */
    31 native Handle:CreateProfiler();
    32 
    33 /**
    34  * Starts profiling.
    35  *
    36  * @param prof		Profiling object.
    37  * @noreturn
    38  * @error			Invalid Handle.
    39  */
    40 native StartProfiling(Handle:prof);
    41 
    42 /**
    43  * Stops profiling.
    44  *
    45  * @param prof		Profiling object.
    46  * @noreturn
    47  * @error			Invalid Handle or profiling was never started.
    48  */
    49 native StopProfiling(Handle:prof);
    50 
    51 /**
    52  * Returns the amount of high-precision time in seconds
    53  * that passed during the profiler's last start/stop 
    54  * cycle.
    55  *
    56  * @param prof		Profiling object.
    57  * @return			Time elapsed in seconds.
    58  * @error			Invalid Handle.
    59  */
    60 native Float:GetProfilerTime(Handle:prof);