Raised This Month: $ Target: $400
 0% 

checking latency between server frames


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Voi
Veteran Member
Join Date: Sep 2006
Location: Gdansk, Poland
Old 10-21-2010 , 12:18   checking latency between server frames
Reply With Quote #1

I want to check the latency in miliseconds between each server frame. After i issue the "check_fps" command i want it to save each value from server_frame(), and when I issue the command again I want it to save all the values in a file, one value at a line.

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Server fps latency checker"
#define VERSION "0"
#define AUTHOR "twoj_stary"

new on_off
new Float:lastframetime

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_srvcmd("check_fps""switch_check")
}

server_frame()
{
    if(
on_off)
    {
    
// (halflife_time() - lastframetime)*1000.0  save the value
    
lastframetime == halflife_time()
    }
}

switch_check()
{
    if(!
on_off)
    {
        
server_print("starting to check latency of each server frame")
        
on_off 1
    
}
    else
    {
        
on_off 0
        server_print
("stopped checking, saving report file to %s"/*FILE+PATH*/)
    }

Attached Files
File Type: sma Get Plugin or Get Source (voi_latency_checker.sma - 606 views - 846 Bytes)
__________________

Last edited by Voi; 10-21-2010 at 12:25.
Voi is offline
 


Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode