Difference between revisions of "Say Region Frames Per Second"
Jump to navigation
Jump to search
Kireji Haiku (talk | contribs) m (minor optimization) |
Omei Qunhua (talk | contribs) m (SLuniverse vote) |
||
Line 7: | Line 7: | ||
string region = llGetRegionName(); | string region = llGetRegionName(); | ||
llSay(0, "Region '" + region + "' is running at " + (string)fps + " fps."); | |||
llSay( | |||
string moreInfo = "CAUTION: '" + region + "' is in danger of crashing."; | string moreInfo = "CAUTION: '" + region + "' is in danger of crashing."; | ||
if ( | if (fps > 15) | ||
moreInfo = "'" + region + "' is running slowly."); | |||
if (fps > 27) | |||
moreInfo = "'" + region + "' is running smoothly."); | moreInfo = "'" + region + "' is running smoothly."); | ||
llSay(0, moreInfo); | |||
} | } | ||
} | } |
Revision as of 12:19, 10 June 2014
<lsl> default {
touch_start(integer num_detected) { float fps = llGetRegionFPS(); string region = llGetRegionName();
llSay(0, "Region '" + region + "' is running at " + (string)fps + " fps.");
string moreInfo = "CAUTION: '" + region + "' is in danger of crashing.";
if (fps > 15) moreInfo = "'" + region + "' is running slowly.");
if (fps > 27) moreInfo = "'" + region + "' is running smoothly.");
llSay(0, moreInfo); }
} </lsl>