private void HandleShowTimers(string module, string[] cmdparams) { if (!IsSceneSelected()) { return; } ScriptTimer timerPlugin = AsyncCommandManager.GetTimerPlugin(m_engine); if (timerPlugin == null) { MainConsole.Instance.Output("Plugin not yet initialized"); return; } List <ScriptTimer.TimerInfo> timersInfo = timerPlugin.GetTimersInfo(); ConsoleDisplayTable cdt = new ConsoleDisplayTable(); cdt.AddColumn("Part local ID", 13); cdt.AddColumn("Script item ID", 36); cdt.AddColumn("Interval", 10); cdt.AddColumn("Next", 8); foreach (ScriptTimer.TimerInfo t in timersInfo) { // Convert from 100 ns ticks back to seconds cdt.AddRow(t.localID, t.itemID, (double)t.interval / 10000000, t.next); } MainConsole.Instance.Output(cdt.ToString()); MainConsole.Instance.Output("Total: {0}", timersInfo.Count); }
private void onChronoReceived(NetworkMessage netMsg) { int joueurFini = netMsg.ReadMessage <MyNetworkMessage>().message; if (joueurFini != position) { ScriptTimer.debutChrono(); } }
// Start is called before the first frame update void Start() // Set current template { level_rules = GetComponentInParent <Rules_Gameloop>(); anim_control = GetComponent <Animator>(); spawn_timer = GetComponent <ScriptTimer>(); //Spawn_Patient_Bed(current_template); }
private TrackList FindTracks(IScriptableApp app, ISfFileHost file) { _vinylRipOptions.Validate(); ScriptTimer.Reset(); List <ScanResult> results = DoFirstPassStatisticsScan(); TrackList tracks = new TrackList(_vinylRipOptions, file); int trackCount = 1; bool currentResultIsTrack = false; foreach (ScanResult scanResult in results) { if (scanResult.RmsLevelExceeds(_vinylRipOptions.GapNoisefloorThresholdInDecibels)) { //Output.ToScriptWindow("{0} above threshold", scanResult.WindowNumber); if (!currentResultIsTrack && tracks.CanAddNextTrack(scanResult.SelectionStart)) { tracks.AddNew(); tracks.LastAdded.StartPosition = scanResult.SelectionStart; tracks.LastAdded.Number = trackCount++; currentResultIsTrack = true; } tracks.LastAdded.EndPosition = scanResult.SelectionEnd; } else if (tracks.CanSetTrackBreak()) { currentResultIsTrack = false; } Output.ToScriptWindow("{0}\t{1}\t{2}\t{3}", scanResult.WindowNumber, OutputHelper.FormatToTimeSpan(file.PositionToSeconds(scanResult.SelectionStart)), OutputHelper.FormatToTimeSpan(file.PositionToSeconds(scanResult.SelectionEnd)), scanResult.GetMaxRmsLevel()); } Output.ToScriptWindow("FindTracks Finished scanning:\r\n- Scanned: {0} windows\r\n- Window Length: {1}s\r\n- Scan Duration: {2}", results.Count, _vinylRipOptions.ScanWindowLengthInSeconds, ScriptTimer.Time()); Output.LineBreakToScriptWindow(); OutputTrackDetails(tracks); ScriptTimer.Reset(); RefineTrackDefinitionsByScanning(tracks); Output.LineBreakToScriptWindow(); Output.ToScriptWindow("RefineTrackDefinitionsByScanning Finished scanning:\r\n- Scan Duration: {0}", ScriptTimer.Time()); Output.LineBreakToScriptWindow(); OutputTrackDetails(tracks); return(tracks); }
public void SetTimerEvent(UUID scriptID, double seconds) { if (seconds == 0) { // Disabling timer UnsetTimerEvents(scriptID); return; } // Convert seconds to increments of 100 nanoseconds (ticks) ScriptTimer st = new ScriptTimer(scriptID, Convert.ToInt64(seconds * 10000000)); // Adds if timer doesn't exist, otherwise replaces with new timer lock (m_syncRoot) m_scriptTimers[scriptID] = st; }
// Start is called before the first frame update void Start() { // Components spawn_bed = GetComponentInParent <Door_Spawn_Script>(); life_gauge = transform.Find("Icon_Panel").GetComponent <Renderer>().material; timer = GetComponent <ScriptTimer>(); // Stats var treatment current_step = 0; required_steps = New_Template(template_id); Update_Icon_Panel(required_steps[current_step]); // Config Components Update_Timer(); }
public static void Initialize() { _timer = new ScriptTimer(); string path = Config.GetUserDirectory("Scripts"); foreach (var fname in Directory.GetFiles(path, "*.uos")) { try { ScriptSource ss = new ScriptSource(fname); _scripts[ss.Name] = ss; } catch { } } Assistant.Scripts.Commands.Register(); Assistant.Scripts.Aliases.Register(); Assistant.Scripts.Expressions.Register(); }
static ScriptManager() { Timer = new ScriptTimer(); }
static ScriptManager() { _timer = new ScriptTimer(); _timer.Start(); }