Difference between revisions of "LlGetRegionFPS"

From Second Life Wiki
Jump to navigation Jump to search
m (<lsl> tag to <source>)
 
(13 intermediate revisions by 6 users not shown)
Line 5: Line 5:
|func_energy=10.0
|func_energy=10.0
|sort=GetRegionFPS
|sort=GetRegionFPS
|func_desc=Returns the mean region frames per second
|func_desc
|func_footnote
|func_footnote
|return_type=float
|return_type=float
|return_text
|return_text=that is the mean region frames per second.
|p1_type|p1_name|p1_desc
|p2_type|p2_name|p2_desc
|p3_type|p3_name|p3_desc
|p4_type|p4_name|p4_desc
|p5_type|p5_name|p5_desc
|p6_type|p6_name|p6_desc
|p7_type|p7_name|p7_desc
|p8_type|p8_name|p8_desc
|p9_type|p9_name|p9_desc
|p10_type|p10_name|p10_desc
|p11_type|p11_name|p11_desc
|p12_type|p12_name|p12_desc
|constants
|constants
|spec
|spec
|caveats
|caveats=
|examples
*Region FPS is currently capped at 45.0 frames per second, so this function never returns greater than 45.0
|examples=<source lang="lsl2">
// The beginnings of a region-info script.
string region;
string sim;
 
default
{
    state_entry()
    {
        llSetTimerEvent(1.0);
    }
 
    timer()
    {
        string here = llGetRegionName();
        if(region != here)
        {
            sim = llGetSimulatorHostname();
            region = here;
        }
        llSetText(
                "  REGION NAME : " + region +
              "\n  SIM HOSTNAME : " + sim +
              "\nTIME DIALATION : " + (string)llGetRegionTimeDilation() +
              "\n    REGION FPS : " + (string)llGetRegionFPS(),
            <0,1,0>, 1.0);
    }
}
</source>
|helpers
|helpers
|also_header
|also_header
|also_functions
|also_functions=
{{LSL DefineRow||[[llGetSimulatorHostname]]|Gets the hostname of the server}}
{{LSL DefineRow||[[llGetRegionTimeDilation]]|Gets the region time dilation}}
|also_tests
|also_tests
|also_events
|also_events
Line 34: Line 53:
|notes
|notes
|mode
|mode
|deprecated
|location
|location
|inventory
|permission
|negative_index
|cat1=Region
|cat1=Region
|cat2
|cat2
|cat3
|cat3
|cat4
|cat4
|cat5
|cat6
}}
}}

Latest revision as of 01:46, 22 January 2015

Summary

Function: float llGetRegionFPS( );
0.0 Forced Delay
10.0 Energy

Returns a float that is the mean region frames per second.

Caveats

  • Region FPS is currently capped at 45.0 frames per second, so this function never returns greater than 45.0

Examples

// The beginnings of a region-info script.
string region;
string sim;

default
{
    state_entry()
    {
        llSetTimerEvent(1.0);
    }

    timer()
    {
        string here = llGetRegionName();
        if(region != here)
        {
            sim = llGetSimulatorHostname();
            region = here;
        }
        llSetText(
                "   REGION NAME : " + region + 
              "\n  SIM HOSTNAME : " + sim + 
              "\nTIME DIALATION : " + (string)llGetRegionTimeDilation() +
              "\n    REGION FPS : " + (string)llGetRegionFPS(),
            <0,1,0>, 1.0);
    }
}

See Also

Functions

•  llGetSimulatorHostname Gets the hostname of the server
•  llGetRegionTimeDilation Gets the region time dilation

Deep Notes

Signature

function float llGetRegionFPS();