// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Observe how resetting script elapsed time behaves // Not compiled or tested in-world // Setup: Use a spare owned test object. Touch to start a one-second local timer test. // Stop / restore: Disable/remove. Tests report privately and do not change visual prim properties. Any temporary timer stops at completion or timeout. // Notes: This affects only this script’s elapsed clock; it does not reset the simulator clock or other scripts. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Runtime verification, not pre-certified behavior. integer active; default { touch_start(integer n) { if(llDetectedKey(0)!=llGetOwner()||active)return; float before=llGetTime(); llResetTime(); float immediate=llGetTime(); active=TRUE; llOwnerSay("Before reset="+(string)before+" immediate after="+(string)immediate); llSetTimerEvent(1.0); } timer() { llSetTimerEvent(0.0); if(active)llOwnerSay("Elapsed at first timer="+(string)llGetTime()); active=FALSE; } changed(integer flags) { if(flags&CHANGED_OWNER)llResetScript(); } }